Skip to content

Commit

Permalink
Merge pull request #42239 from yuzefovich/backport19.2-42129
Browse files Browse the repository at this point in the history
release-19.2: colexec: fix AND and OR projections in some cases
  • Loading branch information
yuzefovich authored Nov 6, 2019
2 parents c4b4ef8 + aa049d7 commit ff13356
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/sql/colexec/and_or_projection_tmpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,14 @@ func (o *_OP_LOWERProjOp) Next(ctx context.Context) coldata.Batch {
var curIdx uint16
if usesSel {
sel := batch.Selection()
origSel := o.origSel[:origLen]
if leftCol.MaybeHasNulls() {
leftNulls := leftCol.Nulls()
for _, i := range o.origSel[:origLen] {
for _, i := range origSel {
_ADD_TUPLE_FOR_RIGHT(true)
}
} else {
for _, i := range o.origSel {
for _, i := range origSel {
_ADD_TUPLE_FOR_RIGHT(false)
}
}
Expand Down

0 comments on commit ff13356

Please sign in to comment.