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
Commit 04a8eb5
Browse filesBrowse the repository at this point in the historyBrowse files
feat: push filters that all references share into the body of a materialized CTE
The new logical optimizer rule PushDownMaterializedCteFilter runs after PushDownFilter. If each scan of a materialized CTE has a filter directly above it, the rule puts the disjunction of these filters on top of the body of the CTE. Each scan keeps its filter. PushDownFilter then moves the new filter into the body in the subsequent pass.
The rule uses only the deterministic terms of a filter that have no subquery and no outer reference. A body with a volatile expression is not changed, because the physical filter pushdown can give a copy of the filter, with the volatile expression in it, to the data source.
MaterializedCte has the new field pushed_filter, which records the filter that the rule added, so that the rule does not add the same filter again in a subsequent optimizer pass.
Closesapache#26239.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
| 20 |`push_down_materialized_cte_filter`| Filters the body of a materialized CTE with the disjunction of the filters of its references, if each reference has one. |
60
+
| 21 |`eliminate_aggregate_distinct`| Drops the `DISTINCT` modifier from aggregates whose result cannot change, such as `min`, `max` and `bit_or`. |
0 commit comments