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 1be3192
Browse filesBrowse the repository at this point in the historyBrowse files
Make settings query_plan_read_in_order and query_plan_optimize_prewhere obsolete
Both settings selected between the query plan implementation of an
optimization and the legacy implementation in `InterpreterSelectQuery`.
The plan-level implementations have been the default for a long time,
so the legacy ones are removed and the settings are made obsolete.
- Remove `ReadInOrderOptimizer` and `SelectQueryInfo::order_optimizer`
together with the old-interpreter plumbing (`executeOrderOptimized`,
`order_by_elements_actions`, `group_by_elements_actions`). The plan
optimization is now gated by `optimize_read_in_order` alone.
- Remove the AST-based `MergeTreeWhereOptimizer::optimize` and the
`try_move_to_prewhere` pass of `InterpreterSelectQuery`. The plan
optimization is now gated by `optimize_move_to_prewhere`, which
`optimizePrewhere` already re-checks per read step.
- Remove the AST side of `RPNBuilderTreeNode` and `RPNBuilderTreeContext`,
leaving only `ActionsDAG` nodes. `KeyCondition::getConstant` and the
`tryGetPreparedSet(DataTypes)` overload go with it. The statistics unit
tests build an `ActionsDAG` via `TreeRewriter` and `ExpressionAnalyzer`
instead of wrapping an AST.
- Stop randomizing `query_plan_optimize_prewhere` in `clickhouse-test` and
drop both settings from the tests, replacing
`query_plan_optimize_prewhere = 0` with `optimize_move_to_prewhere = 0`
and `query_plan_read_in_order = 0` with `optimize_read_in_order = 0`.
With `query_plan_enable_optimizations = 0` the old interpreter previously
still moved conditions to `PREWHERE` through the AST path; it no longer does.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Allow to convert `JOIN` to subquery with `IN` if output columns tied to only left table. May cause wrong results with non-ANY JOINs (e.g. ALL JOINs which is the default).
Run a second `PREWHERE` promotion pass after later query plan optimizations may have
@@ -6987,19 +6984,6 @@ This is an expert-level setting which should only be used for debugging by devel
6987
6984
6988
6985
Possible values:
6989
6986
6990
-
- 0 - Disable
6991
-
- 1 - Enable
6992
-
)", 0) \
6993
-
DECLARE(Bool, query_plan_read_in_order, true, R"(
6994
-
Toggles the read in-order optimization query-plan-level optimization.
6995
-
Only takes effect if setting [`query_plan_enable_optimizations`](#query_plan_enable_optimizations) is 1.
6996
-
6997
-
<Note>
6998
-
This is an expert-level setting which should only be used for debugging by developers. The setting may change in future in backward-incompatible ways or be removed.
6999
-
</Note>
7000
-
7001
-
Possible values:
7002
-
7003
6987
- 0 - Disable
7004
6988
- 1 - Enable
7005
6989
)", 0) \
@@ -9647,6 +9631,8 @@ Enable experimental table function `eval`.
{"query_plan_read_in_order", true, true, "Obsolete setting: the read-in-order optimization is now always applied at the query plan level, and the legacy interpreter-level implementation (`ReadInOrderOptimizer`) was removed. Use `optimize_read_in_order` to toggle the optimization."},
47
+
{"query_plan_optimize_prewhere", true, true, "Obsolete setting: moving conditions from `WHERE` to `PREWHERE` is now always done at the query plan level, and the legacy AST-based implementation in `InterpreterSelectQuery` was removed. Use `optimize_move_to_prewhere` to toggle the optimization."},
46
48
{"iceberg_tolerate_conflicting_manifest_schemas", false, true, "New setting: when an Iceberg manifest file header carries a schema that conflicts with the schema registered for the same schema-id from metadata.json, prefer the metadata.json schema and log a warning instead of failing the query, matching the behavior of other query engines. `compatibility` below 26.10 restores the previous strict behavior."},
47
49
{"legacy_join_size_limits_trigger_spilling", true, false, "`max_rows_in_join` / `max_bytes_in_join` are now hard caps for every hash join, including the ones that spill to disk, where they used to act as the spill trigger. Spilling is driven by `max_bytes_before_external_join` / `max_bytes_ratio_before_external_join` alone."},
48
50
{"prefer_optimize_projection", false, false, "New setting: choose a usable projection regardless of its estimated cost, like `force_optimize_projection`, but without failing the query when no projection is used."},
0 commit comments