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
Describe the bug
Filters are not push down through SubqueryAlias to TableScan during logical plan optimization. This can cause unnecessary IO during pruning parquet files.
mateuszkj
changed the title
Partial filers are not pushdown druing optimalization for table with alias
Filters/limit are not pushdown druing optimalization for table with alias
Apr 18, 2022
Describe the bug
Filters are not push down through
SubqueryAlias
toTableScan
during logical plan optimization. This can cause unnecessary IO during pruning parquet files.To Reproduce
Steps to reproduce the behavior:
Prepare data and run datafusion-cli with logs:
Run query without alias (
partial_filters
is added forTableScan
):Run query with alias (
partial_filters
is not added forTableScan
)Expected behavior
partial_filers
should be push down toTableScan
Additional context
Tested with master branch 5f0b61b. I think this
SubqueryAlias
condition is not handled in file: https://github.com/apache/arrow-datafusion/blob/master/datafusion/core/src/optimizer/filter_push_down.rs#L299=The same situation is with limits and alias:
Limit is push down to
TableScan
:Limit is not push down to
TableScan
when table has alias:The text was updated successfully, but these errors were encountered: