Describe the bug
The predicate in the following SQL should not be pushed down to the OlapScanNode corresponding to the left table.
SELECT * FROM t1 RIGHT ANTI JOIN t0 ON t1.c2 = t0.c2 AND t1.c4 = t0.c3 WHERE true is NULL;
The result set of this query should be empty. The real execution pushes down the predicate in WHERE clause to the scan node under t1, and left table (t1) of the right-anti-join would be empty, so all rows from the right table (t0) are outputted after join as the result set.
Describe the bug The predicate in the following SQL should not be pushed down to the OlapScanNode corresponding to the left table.
SELECT * FROM t1 RIGHT ANTI JOIN t0 ON t1.c2 = t0.c2 AND t1.c4 = t0.c3 WHERE true is NULL;
The result set of this query should be empty. The real execution pushes down the predicate in WHERE clause to the scan node under
t1
, and left table (t1
) of the right-anti-join would be empty, so all rows from the right table (t0
) are outputted after join as the result set.To Reproduce Steps to reproduce the behavior:
Schema:
Rows:
(1,2)
, while it's supposed to be empty:SELECT * FROM t1 RIGHT ANTI JOIN t0 ON t1.c0 = t0.c0 AND t1.c1 = t0.c1 WHERE true is NULL;