alamb commented on code in PR #2352:
URL: https://github.com/apache/arrow-datafusion/pull/2352#discussion_r860184293
##########
datafusion/core/src/sql/planner.rs:
##########
@@ -4311,4 +4327,41 @@ mod tests {
);
quick_test(sql, &expected);
}
+
+ #[test]
+ fn in_subquery_uncorrelated() {
+ let sql = "SELECT id FROM person p WHERE id IN \
+ (SELECT id FROM person)";
+
+ let subquery_expected = "Subquery: Projection: #person.id\
+ \n TableScan: person projection=None";
+
+ let expected = format!(
+ "Projection: #p.id\
+ \n Filter: #p.id IN ({})\
+ \n SubqueryAlias: p\
+ \n TableScan: person projection=None",
+ subquery_expected
+ );
+ quick_test(sql, &expected);
+ }
+
+ #[test]
Review Comment:
👍
--
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]