Skip to content

Commit 5b40c53

Browse files
committed
fix doc
1 parent 46bcc10 commit 5b40c53

1 file changed

Lines changed: 23 additions & 22 deletions

File tree

datafusion/core/src/optimizer_rule_reference.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,29 @@ Rule order matters. The default pipeline may change between releases.
3939
| ----- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
4040
| 1 | `rewrite_set_comparison` | Rewrites `ANY` and `ALL` set-comparison subqueries into `EXISTS`-based boolean expressions with correct SQL NULL semantics. |
4141
| 2 | `optimize_unions` | Flattens nested unions and removes unions with a single input. |
42-
| 3 | `simplify_expressions` | Constant-folds and simplifies expressions while preserving output names. |
43-
| 4 | `replace_distinct_aggregate` | Rewrites `DISTINCT` and `DISTINCT ON` operators into aggregate-based plans that later rules can optimize further. |
44-
| 5 | `eliminate_join` | Replaces keyless inner joins with a literal `false` filter by an empty relation. |
45-
| 6 | `decorrelate_predicate_subquery` | Converts eligible `IN` and `EXISTS` predicate subqueries into semi or anti joins. |
46-
| 7 | `scalar_subquery_to_join` | Rewrites eligible scalar subqueries into joins and adds schema-preserving projections. |
47-
| 8 | `decorrelate_lateral_join` | Rewrites eligible lateral joins into regular joins. |
48-
| 9 | `extract_equijoin_predicate` | Splits join filters into equijoin keys and residual predicates. |
49-
| 10 | `eliminate_duplicated_expr` | Removes duplicate expressions from projections, aggregates, and similar operators. |
50-
| 11 | `eliminate_filter` | Drops always-true filters and replaces always-false or NULL filters with empty relations. |
51-
| 12 | `eliminate_cross_join` | Uses filter predicates to replace cross joins with inner joins when join keys can be found. |
52-
| 13 | `eliminate_limit` | Removes no-op limits and simplifies trivial limit shapes. |
53-
| 14 | `propagate_empty_relation` | Pushes empty-relation knowledge upward so operators fed by no rows collapse early. |
54-
| 15 | `filter_null_join_keys` | Adds `IS NOT NULL` filters to nullable equijoin keys that can never match. |
55-
| 16 | `eliminate_outer_join` | Rewrites outer joins to inner joins when later filters reject the NULL-extended rows. |
56-
| 17 | `push_down_limit` | Moves literal limits closer to scans and unions and merges adjacent limits. |
57-
| 18 | `push_down_filter` | Moves filters as early as possible through filter-commutative operators. |
58-
| 19 | `single_distinct_aggregation_to_group_by` | Rewrites single-column `DISTINCT` aggregations into two-stage `GROUP BY` plans. |
59-
| 20 | `eliminate_group_by_constant` | Removes constant or functionally redundant expressions from `GROUP BY`. |
60-
| 21 | `common_sub_expression_eliminate` | Computes repeated subexpressions once and reuses the result. |
61-
| 22 | `extract_leaf_expressions` | Pulls cheap leaf expressions closer to data sources so later pruning and filter rules can act earlier. |
62-
| 23 | `push_down_leaf_projections` | Pushes the helper projections created by leaf extraction toward leaf inputs. |
63-
| 24 | `optimize_projections` | Prunes unused columns and removes unnecessary logical projections. |
42+
| 3 | `unions_to_filter` | Merges `UNION DISTINCT` branches that share the same source into a single filtered branch with a disjunctive predicate. |
43+
| 4 | `simplify_expressions` | Constant-folds and simplifies expressions while preserving output names. |
44+
| 5 | `replace_distinct_aggregate` | Rewrites `DISTINCT` and `DISTINCT ON` operators into aggregate-based plans that later rules can optimize further. |
45+
| 6 | `eliminate_join` | Replaces keyless inner joins with a literal `false` filter by an empty relation. |
46+
| 7 | `decorrelate_predicate_subquery` | Converts eligible `IN` and `EXISTS` predicate subqueries into semi or anti joins. |
47+
| 8 | `scalar_subquery_to_join` | Rewrites eligible scalar subqueries into joins and adds schema-preserving projections. |
48+
| 9 | `decorrelate_lateral_join` | Rewrites eligible lateral joins into regular joins. |
49+
| 10 | `extract_equijoin_predicate` | Splits join filters into equijoin keys and residual predicates. |
50+
| 11 | `eliminate_duplicated_expr` | Removes duplicate expressions from projections, aggregates, and similar operators. |
51+
| 12 | `eliminate_filter` | Drops always-true filters and replaces always-false or NULL filters with empty relations. |
52+
| 13 | `eliminate_cross_join` | Uses filter predicates to replace cross joins with inner joins when join keys can be found. |
53+
| 14 | `eliminate_limit` | Removes no-op limits and simplifies trivial limit shapes. |
54+
| 15 | `propagate_empty_relation` | Pushes empty-relation knowledge upward so operators fed by no rows collapse early. |
55+
| 16 | `filter_null_join_keys` | Adds `IS NOT NULL` filters to nullable equijoin keys that can never match. |
56+
| 17 | `eliminate_outer_join` | Rewrites outer joins to inner joins when later filters reject the NULL-extended rows. |
57+
| 18 | `push_down_limit` | Moves literal limits closer to scans and unions and merges adjacent limits. |
58+
| 19 | `push_down_filter` | Moves filters as early as possible through filter-commutative operators. |
59+
| 20 | `single_distinct_aggregation_to_group_by` | Rewrites single-column `DISTINCT` aggregations into two-stage `GROUP BY` plans. |
60+
| 21 | `eliminate_group_by_constant` | Removes constant or functionally redundant expressions from `GROUP BY`. |
61+
| 22 | `common_sub_expression_eliminate` | Computes repeated subexpressions once and reuses the result. |
62+
| 23 | `extract_leaf_expressions` | Pulls cheap leaf expressions closer to data sources so later pruning and filter rules can act earlier. |
63+
| 24 | `push_down_leaf_projections` | Pushes the helper projections created by leaf extraction toward leaf inputs. |
64+
| 25 | `optimize_projections` | Prunes unused columns and removes unnecessary logical projections. |
6465

6566
### Physical Optimizer Rules
6667

0 commit comments

Comments
 (0)