xudong963 commented on code in PR #15906:
URL: https://github.com/apache/datafusion/pull/15906#discussion_r2068938611


##########
datafusion/sqllogictest/test_files/push_down_filter.slt:
##########
@@ -259,3 +259,35 @@ logical_plan TableScan: t projection=[a], 
full_filters=[CAST(t.a AS Utf8) = Utf8
 
 statement ok
 drop table t;
+
+statement ok
+create table t1(a int, b int) as values(1, 2), (2, 3), (3 ,4);
+
+statement ok
+create table t2(a int, b int) as values (1, 2), (2, 4), (4, 5);
+
+query TT
+explain select
+  *
+from
+  t1
+  join t2 on t1.a = t2.a
+  and t1.b between t2.b
+  and t2.b + 2
+where
+  t2.b = 3
+----
+logical_plan
+01)Inner Join: t1.a = t2.a
+02)--Projection: t1.a, t1.b
+03)----Filter: __common_expr_4 >= Int64(3) AND __common_expr_4 <= Int64(5)

Review Comment:
   The inferred predicate, which can be pushed down to the t1 scan.



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to