File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ const (
256
256
esIncRight
257
257
esRightIterEOF
258
258
esCompare
259
+ esRejectNull
259
260
esRet
260
261
)
261
262
@@ -272,6 +273,7 @@ func (i *existsIter) Next(ctx *sql.Context) (sql.Row, error) {
272
273
// when the secondaryProvider is empty
273
274
// - antiJoin succeeds to RET when LOAD_RIGHT EOF's
274
275
// - semiJoin fails when LOAD_RIGHT EOF's, falling back to LOAD_LEFT
276
+ // - antiJoin fails when COMPARE returns true, falling back to LOAD_LEFT
275
277
nextState := esIncLeft
276
278
for {
277
279
switch nextState {
@@ -323,6 +325,11 @@ func (i *existsIter) Next(ctx *sql.Context) (sql.Row, error) {
323
325
return nil , err
324
326
}
325
327
328
+ if res == nil && i .typ .IsExcludeNulls () {
329
+ nextState = esRejectNull
330
+ continue
331
+ }
332
+
326
333
if ! sql .IsTrue (res ) {
327
334
nextState = esIncRight
328
335
} else {
@@ -337,6 +344,12 @@ func (i *existsIter) Next(ctx *sql.Context) (sql.Row, error) {
337
344
nextState = esRet
338
345
}
339
346
}
347
+ case esRejectNull :
348
+ if i .typ .IsAnti () {
349
+ nextState = esIncLeft
350
+ } else {
351
+ nextState = esIncRight
352
+ }
340
353
case esRet :
341
354
return i .removeParentRow (left ), nil
342
355
default :
You can’t perform that action at this time.
0 commit comments