Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

execinfra: correctly propagate processorID for LocalProcessors #98654

Merged
merged 1 commit into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/sql/execinfra/processorsbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ func NewLimitedMonitorNoFlowCtx(
type LocalProcessor interface {
RowSourcedProcessor
// InitWithOutput initializes this processor.
InitWithOutput(ctx context.Context, flowCtx *FlowCtx, post *execinfrapb.PostProcessSpec, output RowReceiver) error
InitWithOutput(ctx context.Context, flowCtx *FlowCtx, processorID int32, post *execinfrapb.PostProcessSpec, output RowReceiver) error
// SetInput initializes this LocalProcessor with an input RowSource. Not all
// LocalProcessors need inputs, but this needs to be called if a
// LocalProcessor expects to get its data from another RowSource.
Expand Down
3 changes: 2 additions & 1 deletion pkg/sql/plan_node_to_row_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ func (p *planNodeToRowSource) MustBeStreaming() bool {
func (p *planNodeToRowSource) InitWithOutput(
ctx context.Context,
flowCtx *execinfra.FlowCtx,
processorID int32,
post *execinfrapb.PostProcessSpec,
output execinfra.RowReceiver,
) error {
Expand All @@ -121,7 +122,7 @@ func (p *planNodeToRowSource) InitWithOutput(
// newPlanNodeToRowSource, so we can just use the eval context from the
// params.
p.params.EvalContext(),
0, /* processorID */
processorID,
output,
nil, /* memMonitor */
execinfra.ProcStateOpts{
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/rowexec/processors.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func NewProcessor(
return nil, err
}
processor := localProcessors[core.LocalPlanNode.RowSourceIdx]
if err := processor.InitWithOutput(ctx, flowCtx, post, outputs[0]); err != nil {
if err := processor.InitWithOutput(ctx, flowCtx, processorID, post, outputs[0]); err != nil {
return nil, err
}
if numInputs == 1 {
Expand Down