Skip to content

Commit 322b97f

Browse files
committed
Fix CI: update config docs, sqllogictest, and doc links
- Regenerate configs.md for new enable_expression_analyzer option - Add enable_expression_analyzer to information_schema.slt expected output - Fix unresolved doc links to SessionState and DefaultExpressionAnalyzer (cross-crate references use backticks instead of doc links) - Simplify config description
1 parent 1b4a158 commit 322b97f

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

datafusion/common/src/config.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -965,9 +965,8 @@ config_namespace! {
965965

966966
/// When set to true, the physical planner will use the ExpressionAnalyzer
967967
/// framework for expression-level statistics estimation (NDV, selectivity,
968-
/// min/max, null fraction) in projections and filters. When false, projections
969-
/// return unknown statistics for non-column expressions and filters use the
970-
/// default selectivity heuristic.
968+
/// min/max, null fraction). When false, existing behavior without
969+
/// expression-level statistics support is used.
971970
pub enable_expression_analyzer: bool, default = false
972971

973972
/// When set to true, the optimizer will insert filters before a join between

datafusion/physical-expr/src/projection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,10 @@ impl ProjectionExprs {
200200

201201
/// Set the expression analyzer registry for statistics estimation.
202202
///
203-
/// The physical planner injects the registry from [`SessionState`] when
203+
/// The physical planner injects the registry from `SessionState` when
204204
/// creating projections. Projections created later by optimizer rules
205205
/// do not receive the registry and fall back to
206-
/// [`DefaultExpressionAnalyzer`]. Propagating the registry to all
206+
/// `DefaultExpressionAnalyzer`. Propagating the registry to all
207207
/// operator construction sites requires an operator-level statistics
208208
/// registry, which is orthogonal to this work.
209209
pub fn with_expression_analyzer_registry(

datafusion/physical-plan/src/filter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ impl FilterExecBuilder {
185185
/// Set the expression analyzer registry for selectivity estimation.
186186
///
187187
/// Same limitation as [`ProjectionExprs::with_expression_analyzer_registry`]:
188-
/// the planner injects this from [`SessionState`], but filters created
188+
/// the planner injects this from `SessionState`, but filters created
189189
/// by optimizer rules (e.g., filter pushdown into unions) fall back to
190190
/// the default selectivity. An operator-level statistics registry is
191191
/// needed for full coverage.

datafusion/sqllogictest/test_files/information_schema.slt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ datafusion.optimizer.default_filter_selectivity 20
297297
datafusion.optimizer.enable_aggregate_dynamic_filter_pushdown true
298298
datafusion.optimizer.enable_distinct_aggregation_soft_limit true
299299
datafusion.optimizer.enable_dynamic_filter_pushdown true
300+
datafusion.optimizer.enable_expression_analyzer false
300301
datafusion.optimizer.enable_join_dynamic_filter_pushdown true
301302
datafusion.optimizer.enable_leaf_expression_pushdown true
302303
datafusion.optimizer.enable_piecewise_merge_join false
@@ -438,6 +439,7 @@ datafusion.optimizer.default_filter_selectivity 20 The default filter selectivit
438439
datafusion.optimizer.enable_aggregate_dynamic_filter_pushdown true When set to true, the optimizer will attempt to push down Aggregate dynamic filters into the file scan phase.
439440
datafusion.optimizer.enable_distinct_aggregation_soft_limit true When set to true, the optimizer will push a limit operation into grouped aggregations which have no aggregate expressions, as a soft limit, emitting groups once the limit is reached, before all rows in the group are read.
440441
datafusion.optimizer.enable_dynamic_filter_pushdown true When set to true attempts to push down dynamic filters generated by operators (TopK, Join & Aggregate) into the file scan phase. For example, for a query such as `SELECT * FROM t ORDER BY timestamp DESC LIMIT 10`, the optimizer will attempt to push down the current top 10 timestamps that the TopK operator references into the file scans. This means that if we already have 10 timestamps in the year 2025 any files that only have timestamps in the year 2024 can be skipped / pruned at various stages in the scan. The config will suppress `enable_join_dynamic_filter_pushdown`, `enable_topk_dynamic_filter_pushdown` & `enable_aggregate_dynamic_filter_pushdown` So if you disable `enable_topk_dynamic_filter_pushdown`, then enable `enable_dynamic_filter_pushdown`, the `enable_topk_dynamic_filter_pushdown` will be overridden.
442+
datafusion.optimizer.enable_expression_analyzer false When set to true, the physical planner will use the ExpressionAnalyzer framework for expression-level statistics estimation (NDV, selectivity, min/max, null fraction). When false, existing behavior without expression-level statistics support is used.
441443
datafusion.optimizer.enable_join_dynamic_filter_pushdown true When set to true, the optimizer will attempt to push down Join dynamic filters into the file scan phase.
442444
datafusion.optimizer.enable_leaf_expression_pushdown true When set to true, the optimizer will extract leaf expressions (such as `get_field`) from filter/sort/join nodes into projections closer to the leaf table scans, and push those projections down towards the leaf nodes.
443445
datafusion.optimizer.enable_piecewise_merge_join false When set to true, piecewise merge join is enabled. PiecewiseMergeJoin is currently experimental. Physical planner will opt for PiecewiseMergeJoin when there is only one range filter.

docs/source/user-guide/configs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ The following configuration settings are available:
143143
| datafusion.optimizer.enable_join_dynamic_filter_pushdown | true | When set to true, the optimizer will attempt to push down Join dynamic filters into the file scan phase. |
144144
| datafusion.optimizer.enable_aggregate_dynamic_filter_pushdown | true | When set to true, the optimizer will attempt to push down Aggregate dynamic filters into the file scan phase. |
145145
| datafusion.optimizer.enable_dynamic_filter_pushdown | true | When set to true attempts to push down dynamic filters generated by operators (TopK, Join & Aggregate) into the file scan phase. For example, for a query such as `SELECT * FROM t ORDER BY timestamp DESC LIMIT 10`, the optimizer will attempt to push down the current top 10 timestamps that the TopK operator references into the file scans. This means that if we already have 10 timestamps in the year 2025 any files that only have timestamps in the year 2024 can be skipped / pruned at various stages in the scan. The config will suppress `enable_join_dynamic_filter_pushdown`, `enable_topk_dynamic_filter_pushdown` & `enable_aggregate_dynamic_filter_pushdown` So if you disable `enable_topk_dynamic_filter_pushdown`, then enable `enable_dynamic_filter_pushdown`, the `enable_topk_dynamic_filter_pushdown` will be overridden. |
146+
| datafusion.optimizer.enable_expression_analyzer | false | When set to true, the physical planner will use the ExpressionAnalyzer framework for expression-level statistics estimation (NDV, selectivity, min/max, null fraction). When false, existing behavior without expression-level statistics support is used. |
146147
| datafusion.optimizer.filter_null_join_keys | false | When set to true, the optimizer will insert filters before a join between a nullable and non-nullable column to filter out nulls on the nullable side. This filter can add additional overhead when the file format does not fully support predicate push down. |
147148
| datafusion.optimizer.repartition_aggregations | true | Should DataFusion repartition data using the aggregate keys to execute aggregates in parallel using the provided `target_partitions` level |
148149
| datafusion.optimizer.repartition_file_min_size | 10485760 | Minimum total files size in bytes to perform file scan repartitioning. |

0 commit comments

Comments
 (0)