Repository navigation
Rename setting allow_experimental_trino_dialect to enable_trino_dialect - #120007
Conversation
Requested by @fm4v on ClickHouse#115383, which added the setting. The `allow_experimental_` prefix is the pre-tier way of gating a feature. The `EXPERIMENTAL` tier in the declaration already carries that information and is exposed as `tier` in `system.settings`, so the prefix duplicates it in the one place that is expensive to change later, the name. This follows ClickHouse#113480, which renamed the sibling dialect gate `allow_experimental_json_ast_dialect` to `enable_json_ast_dialect`. Plain rename with no alias, because no released version carries the old name: `src/Core/Settings.cpp` on the 26.8, 26.7 and 26.6 branches contains it 0 times, the newest stable tag is v26.8.3.105-lts, and its history record is in the unreleased 26.9 block. The record is therefore renamed in place rather than a second one being added: an in-place rename keeps the value signature and reason text identical, which is what makes `parse_settings_history_changes` recognize it as a rename and report it under the new name only, and what keeps `03999_stateless_settings_history` from seeing a record naming a setting that no longer exists. Users on master or nightly who already set the old name will get UNKNOWN_SETTING. The `enableAllExperimentalSettings` entry is deleted rather than renamed. That helper enables experimental features that can be used in a CREATE query, so that `DatabaseReplicated::recoverLostReplica` can re-create tables from stored metadata; `dialect` is a session setting governing how query text is parsed and cannot appear in a CREATE query, which is why the kusto, prql and polyglot gates are entries in `experimental_settings_ignore.txt` instead. Trino was the only one registered in the helper, added by 0f8a473 ("Fix Trino dialect CI failures") to satisfy the `allow_*` registration check in check_cpp.sh rather than to fix a recovery failure. No ignore-list entry replaces it: that check compares `allow_*` tokens only, and the renamed setting no longer has such a token, so an entry would be unused and would fail the same check. The autogenerated settings documentation is left to the nightly docs job, which regenerates it from `src/Core/Settings.cpp`. Co-Authored-By: Claude Opus 5 <[email protected]>
Two renamed sites in `LocalConnection` were reached by no test: the parser-affecting settings captured at parse time and the `input()` initializer that reparses the original query with them. Every other trino test drives `clickhouse-client`, so `LocalConnection` is never entered. The invariant is that a query accepted with the gate on keeps being reparsed with the gate on, even when the query's own `SETTINGS` clause turns it off during execution; reading the live value there would fail an otherwise valid query with SUPPORT_IS_DISABLED from inside the initializer. The sibling `clickhouse_json` gate already has this coverage in 04349_ast_json_local_input_dialect_boundary, whose shape the two new arms follow. The second arm runs the same query without the gate, so the first arm cannot pass for an unrelated reason. The gate message tells the user which setting to turn on and nothing asserted its text; the existing assertion greps the error code only. The new assertion greps the setting name rather than the sentence, since the prose can be reworded while the name is the contract. Co-Authored-By: Claude Opus 5 <[email protected]>
Internal second-model review (2 cold reviews, 1 fix round, 2 findings adjudicated)An independent model reviewed this change cold, without the author's evidence; a fix round followed;
Also checked and clear: rename completeness (0 occurrences of the old name outside autogenerated Also noticed, not raised: |
|
Workflow [PR], commit [312fd26] Summary: ❌
AI ReviewSummaryThis PR renames the Trino dialect gate from Final Verdict✅ No blocking or major issues found in the current PR state. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units27 translation units recompiled, 158 s compile time in total, 27 of them have a recent master baseline. |
CI finish ledger - 312fd26Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
#116209 is the causal owner, not a same-area coincidence: it splits this exact lane into Not reachable from this diff: the change renames one setting, Session id: cron:our-pr-ci-monitor:20260914-220033 |
4f217e7
Related: #115383
Related: #113480
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Description
@ fm4v asked for this rename on #115383, which added the setting.
allow_experimental_trino_dialectbecomesenable_trino_dialect, following #113480, where thesibling dialect gate
allow_experimental_json_ast_dialectwas renamed for the reasons given there.The tier stays
EXPERIMENTALand the default staysfalse; only the name changes.Plain rename, no alias, because no released version carries the old name:
src/Core/Settings.cppon the
26.8,26.7and26.6branches contains it 0 times, and its history record sits in theunreleased
26.9block, renamed in place there.The
enableAllExperimentalSettings.cppentry is deleted rather than renamed. That helper allowsexperimental features that can be used in a CREATE query when
recoverLostReplica()re-createstables from stored metadata; a session-level dialect gate is not one, which is why the
kusto,prqlandpolyglotgates are exceptions there rather than entries. Trino was the only oneentered, by
0f8a47380ad509("Fix Trino dialect CI failures"), to answer theallow_*registration check in
check_cpp.sh. Noexperimental_settings_ignore.txtentry replaces it: Iran that check's predicate on this tree and it is empty, and an unused entry reds it too.
One consequence to flag: anyone already setting the old name on master or nightly gets
UNKNOWN_SETTING. Nothing released breaks, but I can useDECLARE_WITH_ALIASto keep the oldname working instead. Your call.
This PR adds no check forbidding new
allow_experimental_*canonical names. 24 such names remainafter it, so a check needs a 24-entry grandfather list, and whether those get renamed or
grandfathered is a maintainer's decision rather than something to settle inside a one-setting
rename. I have asked that question on #115383.
05020_trino_dialect_errorsalso gains coverage for theclickhouse-localinput()reparse path,which reads the gate captured at parse time, and for the gate message naming the setting.
Autogenerated settings pages are left to the nightly docs job (
ci/jobs/docs_autogen_nightly.py).Workflow [PR]
Sync PR [sync-upstream/pr/120007]
Version info
26.9.1.1505(included in26.9and later)