Skip to content
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
6 changes: 0 additions & 6 deletions pkg/sql/colexec/and_or_projection.eg.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions pkg/sql/colexec/and_or_projection_tmpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,16 @@ func (o *_OP_LOWERProjOp) Init(ctx context.Context) {
o.rightProjOpChain.Init(o.Ctx)
}

// {{/*
// TODO(yuzefovich): this operator is a bit sketchy because it works only
// under the assumption that the projection arms return exactly the same
// batch as they are fed (i.e. the projection operators aren't allowed to
// populate their own output batches from scratch) and that the deselection
// step isn't performed. Refactor this to make more resilient, and this will
// allow for simplifying the CASE operator by planning a deselector on top
// of its input.
// */}}

// Next is part of the colexecop.Operator interface.
// The idea to handle the short-circuiting logic is similar to what caseOp
// does: a logical operator has an input and two projection chains. First,
Expand All @@ -165,15 +175,6 @@ func (o *_OP_LOWERProjOp) Init(ctx context.Context) {
// side projection only on the remaining tuples (i.e. those that were not
// "subtracted"). Next, it restores the original selection vector and
// populates the result of the logical operation.
// {{/*
// TODO(yuzefovich): this operator is a bit sketchy because it works only
// under the assumption that the projection arms return exactly the same
// batch as they are fed (i.e. the projection operators aren't allowed to
// populate their own output batches from scratch) and that the deselection
// step isn't performed. Refactor this to make more resilient, and this will
// allow for simplifying the CASE operator by planning a deselector on top
// of its input.
// */}}
func (o *_OP_LOWERProjOp) Next() coldata.Batch {
batch := o.input.Next()
origLen := batch.Length()
Expand Down