sgrebnov commented on code in PR #21694:
URL: https://github.com/apache/datafusion/pull/21694#discussion_r3136309043
##########
datafusion/sql/tests/cases/plan_to_sql.rs:
##########
@@ -1898,7 +1898,39 @@ fn test_join_with_table_scan_filters() -> Result<()> {
let sql = plan_to_sql(&join_plan_duplicated_filter)?;
assert_snapshot!(
sql,
- @r#"SELECT * FROM left_table AS "left" INNER JOIN right_table ON
"left".id = right_table.id AND (("left".id > 5) AND (("left"."name" LIKE
'some_name' AND (right_table.age > 10)) AND (right_table.age < 11)))"#
+ @r#"SELECT * FROM left_table AS "left" INNER JOIN right_table ON
"left".id = right_table.id AND ("left".id > 5) WHERE "left"."name" LIKE
'some_name' AND (right_table.age > 10) AND (right_table.age < 11)"#
+ );
+
+ // Inner join with a scalar subquery in table_scan_filters. The subquery
filter should appear in WHERE, not in JOIN ON,
Review Comment:
Good point, added additional tests for EXISTS and IN subquery - thank you
--
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]