sgrebnov commented on code in PR #13496:
URL: https://github.com/apache/datafusion/pull/13496#discussion_r1853129524
##########
datafusion/sql/tests/cases/plan_to_sql.rs:
##########
@@ -1153,7 +1153,7 @@ fn test_join_with_table_scan_filters() -> Result<()> {
let sql = plan_to_sql(&join_plan_multiple_filters)?;
- let expected_sql = r#"SELECT * FROM left_table AS "left" JOIN right_table
ON "left".id = right_table.id AND (("left".id > 5) AND (("left"."name" LIKE
'some_name' AND (right_table."name" = 'before_join_filter_val')) AND (age >
10))) WHERE ("left"."name" = 'after_join_filter_val')"#;
+ let expected_sql = r#"SELECT * FROM left_table AS "left" JOIN right_table
ON "left".id = right_table.id AND ("left".id > 5) WHERE ("left"."name" =
'after_join_filter_val') AND "left"."name" LIKE 'some_name' AND
((right_table."name" = 'before_join_filter_val') AND (right_table.age > 10))"#;
Review Comment:
I'm under impression that this change will result in incorrect behavior we
were trying to fix here:
https://github.com/apache/datafusion/pull/13132.
Filtering after join is not the same as filtering during/before join (I
would expect filters should be in subquery during join/ not after). Let me
double check this please
--
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]