Skip to content

Commit 651f5d3

Browse files
committed
fix: push_down_filter optimization pass can push a IN(<subquery>) into a TableScan's filter clause
1 parent fbc9c46 commit 651f5d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

datafusion/expr/src/logical_plan/invariants.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,13 @@ pub fn check_subquery_expr(
210210
match outer_plan {
211211
LogicalPlan::Projection(_)
212212
| LogicalPlan::Filter(_)
213+
| LogicalPlan::TableScan(_)
213214
| LogicalPlan::Window(_)
214215
| LogicalPlan::Aggregate(_)
215216
| LogicalPlan::Join(_) => Ok(()),
216217
_ => plan_err!(
217218
"In/Exist subquery can only be used in \
218-
Projection, Filter, Window functions, Aggregate and Join plan nodes, \
219+
Projection, Filter, Window functions, TableScans, Aggregate and Join plan nodes, \
219220
but was used in [{}]",
220221
outer_plan.display()
221222
),

0 commit comments

Comments
 (0)