eejbyfeldt commented on code in PR #12458: URL: https://github.com/apache/datafusion/pull/12458#discussion_r1761592476
########## datafusion/sqllogictest/test_files/join.slt: ########## @@ -766,6 +766,50 @@ set datafusion.execution.target_partitions = 4; statement ok set datafusion.optimizer.repartition_joins = false; +statement ok +DROP TABLE t1; + +statement ok +DROP TABLE t2; + +# tables for join nulls equals null +statement ok +CREATE TABLE IF NOT EXISTS t1(t1_id INT NULL, t1_int INT) AS VALUES +(11, 1), +(22, 2), +(NULL, 3); + +statement ok +CREATE TABLE IF NOT EXISTS t2(t2_id INT NULL, t2_int INT) AS VALUES +(11, 3), +(33, 1), +(NULL, 5), +(NULL, 6); + + +# IS NOT DISTRINCT can be transformed into equijoin +query TT +EXPLAIN SELECT t1_id, t1_int, t2_int FROM t1 JOIN t2 ON t1_id IS NOT DISTINCT from t2_id Review Comment: Good suggestions for: > how these join will be treated by push_down_filter -- in some cases it seems to be able to push filters into ON conditions -- if so, resulting query won't be correct in case of null_equals_null joins I thought these would be pushed into the `filter` and not the `on` (https://github.com/eejbyfeldt/datafusion/blob/1d4cf53169fd9a611a7e24e9ac4880d3e24b131e/datafusion/expr/src/logical_plan/plan.rs#L2965-L2968) and therefore still be correct. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
