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
Copy file name to clipboardExpand all lines: datafusion/core/src/optimizer_rule_reference.md
+15-16Lines changed: 15 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,20 +75,19 @@ in multiple phases.
75
75
| 3 |`join_selection`| - | Chooses join implementation, build side, and partition mode from statistics and stream properties. |
76
76
| 4 |`LimitedDistinctAggregation`| - | Pushes limit hints into grouped distinct-style aggregations when only a small result is needed. |
77
77
| 5 |`FilterPushdown`| pre-optimization phase | Pushes supported physical filters down toward data sources before distribution and sorting are enforced. |
78
-
| 6 |`EnforceDistribution`| - |Adds repartitioning only where needed to satisfy physical distribution requirements.|
78
+
| 6 |`EnsureRequirements`| - |Enforces both distribution and sorting requirements in a single idempotent rule. |
79
79
| 7 |`CombinePartialFinalAggregate`| - | Collapses adjacent partial and final aggregates when the distributed shape makes them redundant. |
80
-
| 8 |`EnforceSorting`| - | Adds or removes local sorts to satisfy required input orderings. |
81
-
| 9 |`OptimizeAggregateOrder`| - | Updates aggregate expressions to use the best ordering once sort requirements are known. |
82
-
| 10 |`WindowTopN`| - | Replaces eligible row-number window and filter patterns with per-partition TopK execution. |
83
-
| 11 |`ProjectionPushdown`| early pass | Pushes projections toward inputs before later physical rewrites add more limit and TopK structure. |
84
-
| 12 |`OutputRequirements`| remove phase | Removes the temporary output-requirement helper nodes after requirement-sensitive planning is done. |
85
-
| 13 |`LimitAggregation`| - | Passes a limit hint into eligible aggregations so they can keep fewer accumulator buckets. |
86
-
| 14 |`LimitPushPastWindows`| - | Pushes fetch limits through bounded window operators when doing so keeps the result correct. |
87
-
| 15 |`HashJoinBuffering`| - | Adds buffering on the probe side of hash joins so probing can start before build completion. |
88
-
| 16 |`LimitPushdown`| - | Moves physical limits into child operators or fetch-enabled variants to cut data early. |
89
-
| 17 |`TopKRepartition`| - | Pushes TopK below hash repartition when the partition key is a prefix of the sort key. |
90
-
| 18 |`ProjectionPushdown`| late pass | Runs projection pushdown again after limit and TopK rewrites expose new pruning opportunities. |
91
-
| 19 |`PushdownSort`| - | Pushes sort requirements into data sources that can already return sorted output. |
92
-
| 20 |`EnsureCooperative`| - | Wraps non-cooperative plan parts so long-running tasks yield fairly. |
93
-
| 21 |`FilterPushdown(Post)`| post-optimization phase | Pushes dynamic filters at the end of optimization, after plan references stop moving. |
94
-
| 22 |`SanityCheckPlan`| - | Validates that the final physical plan meets ordering, distribution, and infinite-input safety requirements. |
80
+
| 8 |`OptimizeAggregateOrder`| - | Updates aggregate expressions to use the best ordering once sort requirements are known. |
81
+
| 9 |`WindowTopN`| - | Replaces eligible row-number window and filter patterns with per-partition TopK execution. |
82
+
| 10 |`ProjectionPushdown`| early pass | Pushes projections toward inputs before later physical rewrites add more limit and TopK structure. |
83
+
| 11 |`OutputRequirements`| remove phase | Removes the temporary output-requirement helper nodes after requirement-sensitive planning is done. |
84
+
| 12 |`LimitAggregation`| - | Passes a limit hint into eligible aggregations so they can keep fewer accumulator buckets. |
85
+
| 13 |`LimitPushPastWindows`| - | Pushes fetch limits through bounded window operators when doing so keeps the result correct. |
86
+
| 14 |`HashJoinBuffering`| - | Adds buffering on the probe side of hash joins so probing can start before build completion. |
87
+
| 15 |`LimitPushdown`| - | Moves physical limits into child operators or fetch-enabled variants to cut data early. |
88
+
| 16 |`TopKRepartition`| - | Pushes TopK below hash repartition when the partition key is a prefix of the sort key. |
89
+
| 17 |`ProjectionPushdown`| late pass | Runs projection pushdown again after limit and TopK rewrites expose new pruning opportunities. |
90
+
| 18 |`PushdownSort`| - | Pushes sort requirements into data sources that can already return sorted output. |
91
+
| 19 |`EnsureCooperative`| - | Wraps non-cooperative plan parts so long-running tasks yield fairly. |
92
+
| 20 |`FilterPushdown(Post)`| post-optimization phase | Pushes dynamic filters at the end of optimization, after plan references stop moving. |
93
+
| 21 |`SanityCheckPlan`| - | Validates that the final physical plan meets ordering, distribution, and infinite-input safety requirements. |
0 commit comments