You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scalar subquery filters not pushed down to TableScan #21324
SELECT ... FROM customer
WHERE c_acctbal > (SELECTavg(c_acctbal) FROM customer WHERE ...)
It would be good to push the predicate down to the scan on customer.
The problem with doing this now is that filter_partitions calls create_physical_expr with a fresh ExecutionProps, so we don't have a way to pass the ScalarSubqueryResults to any ScalarSubqueryExpr nodes in the filter expression. This should be fixable in theory.
We'd also need to update extract_dml_filters to apply subquery filters.
This is distinct from using subquery filters for partition pruning, which would be more difficult (we'd need to evaluate the subquery at planning-time).
Activity
neilconway commentedon Apr 2, 2026
take
neilconway commentedon Apr 3, 2026
Another approach would be to use dynamic filters, which maybe is net easier.
perf: Implement physical execution of uncorrelated scalar subqueries (a…