Skip to content

Commit 165e9b5

Browse files
committed
right column should not be skipped for nil comparisons in anti-joins
1 parent 6a19649 commit 165e9b5

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

sql/rowexec/join_iters.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ const (
256256
esIncRight
257257
esRightIterEOF
258258
esCompare
259-
esRejectNull
260259
esRet
261260
)
262261

@@ -273,7 +272,6 @@ func (i *existsIter) Next(ctx *sql.Context) (sql.Row, error) {
273272
// when the secondaryProvider is empty
274273
// - antiJoin succeeds to RET when LOAD_RIGHT EOF's
275274
// - semiJoin fails when LOAD_RIGHT EOF's, falling back to LOAD_LEFT
276-
// - antiJoin fails when COMPARE returns true, falling back to LOAD_LEFT
277275
nextState := esIncLeft
278276
for {
279277
switch nextState {
@@ -325,11 +323,6 @@ func (i *existsIter) Next(ctx *sql.Context) (sql.Row, error) {
325323
return nil, err
326324
}
327325

328-
if res == nil && i.typ.IsExcludeNulls() {
329-
nextState = esRejectNull
330-
continue
331-
}
332-
333326
if !sql.IsTrue(res) {
334327
nextState = esIncRight
335328
} else {
@@ -344,12 +337,6 @@ func (i *existsIter) Next(ctx *sql.Context) (sql.Row, error) {
344337
nextState = esRet
345338
}
346339
}
347-
case esRejectNull:
348-
if i.typ.IsAnti() {
349-
nextState = esIncLeft
350-
} else {
351-
nextState = esIncRight
352-
}
353340
case esRet:
354341
return i.removeParentRow(left), nil
355342
default:

0 commit comments

Comments
 (0)