wiedld commented on code in PR #13651:
URL: https://github.com/apache/datafusion/pull/13651#discussion_r1889381812


##########
datafusion/expr/src/logical_plan/invariants.rs:
##########
@@ -109,12 +210,13 @@ pub fn check_subquery_expr(
         match outer_plan {
             LogicalPlan::Projection(_)
             | LogicalPlan::Filter(_)
+            | LogicalPlan::TableScan(_)
             | LogicalPlan::Window(_)
             | LogicalPlan::Aggregate(_)
             | LogicalPlan::Join(_) => Ok(()),
             _ => plan_err!(
                 "In/Exist subquery can only be used in \
-                Projection, Filter, Window functions, Aggregate and Join plan 
nodes, \
+                Projection, Filter, TableScan, Window functions, Aggregate and 
Join plan nodes, \

Review Comment:
   The `push_down_filter` optimization pass can push a `IN(<subquery>)` into a 
TableScan. This change was required for 
[push_down_filter::tests::test_in_subquery_with_alias](https://github.com/apache/datafusion/blob/452a8f4fa8fbfd88a5a71310bc28b9f78685c66f/datafusion/optimizer/src/push_down_filter.rs#L2836)
 to pass.



-- 
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