Skip to content

Add aliases for allow_experimental settings, pt. II - #119949

Merged
alexey-milovidov merged 5 commits into
masterfrom
alias-2
Nov 4, 2026
Merged

alexey-milovidov merged 5 commits into
masterfrom
alias-2

Conversation

@rschu1ze

@rschu1ze rschu1ze commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Continuation of #119056

"experimental" must no longer occur in setting names (the tier already indicates this). This PR renames

  • allow_experimental_database_materialized_postgresql -> enable_database_materialized_postgresql
  • allow_experimental_database_hms_catalog -> enable_database_hms_catalog
  • allow_experimental_kusto_dialect -> enable_kusto_dialect
  • allow_experimental_prql_dialect -> enable_prql_dialect
  • allow_experimental_polyglot_dialect -> enable_polyglot_dialect
  • allow_experimental_cleanup_old_data_files_compaction -> enable_cleanup_old_data_files_compaction
  • allow_experimental_expire_snapshots -> allow_expire_snapshots
  • allow_experimental_ytsaurus_table_engine -> enable_ytsaurus_table_engine
  • allow_experimental_ytsaurus_table_function -> enable_ytsaurus_table_function
  • allow_experimental_ytsaurus_dictionary_source -> enable_ytsaurus_dictionary_source
  • allow_experimental_paimon_storage_engine -> enable_paimon_storage_engine
  • allow_experimental_object_storage_queue_hive_partitioning -> enable_object_storage_queue_hive_partitioning
  • allow_experimental_database_paimon_rest_catalog -> enable_database_paimon_rest_catalog
  • allow_experimental_eval_table_function -> enable_eval_table_function

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Workflow [PR]
Sync PR [sync-upstream/pr/119949]

Version info

  • Merged into: 26.11.1.1315-master (included in 26.11 and later)

@clickhouse-gh

clickhouse-gh Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [a494131]

Summary: ✅


AI Review

Summary

This PR renames 14 feature settings, retains the previous names as input aliases, updates their consumers and documentation, and preserves the persistent Iceberg table-setting alias. The earlier persistence and documentation findings are addressed. One acknowledged compatibility regression remains; no additional inline findings were identified.

Findings

❌ Blockers

  • src/Core/Settings.cpp:11027: Input aliases do not preserve settings sent to older servers. BaseSettings::write writes canonical names (src/Core/BaseSettings.h:770), and Connection::sendQuery does not translate them for older peers (src/Client/Connection.cpp:1104). Consequently, a new client using --allow_experimental_kusto_dialect=1 --dialect=kusto --query 'print 1' sends enable_kusto_dialect; a pre-rename server ignores that unknown, non-important setting and rejects the query with SUPPORT_IS_DISABLED. The other renamed settings share this serialization path. Preserve the old serialized names for older peers, or retain the old canonical names and add the new spellings as aliases.

    [dismissed by author -- https://github.com/Add aliases for allow_experimental settings, pt. II #119949#discussion_r4448289802]
    The author accepts this existing alias-design limitation and proposes server-side settings/profiles as a workaround. It remains a regression for these previously working client commands because changing the server configuration is required to restore them.

Tests
  • ⚠️ Add a focused new-client/old-server regression using the previous setting spelling. It must prove the requested feature gate reaches the older server. The new persistent table-setting test does not exercise native-protocol serialization. No local mixed-version execution was performed.
Final Verdict

Status: ❌ Block. Preserve the renamed settings across supported mixed-version connections and cover that behavior with a focused regression. The dismissed finding is retained here only; no reply or duplicate inline comment was posted.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Sep 14, 2026
Comment thread src/Core/Settings.cpp Resolved
Comment thread src/Core/Settings.cpp Resolved
@clickhouse-gh clickhouse-gh Bot added the comp-settings Settings & configuration infrastructure (server/user/query settings, profiles). label Sep 14, 2026
@clickhouse-gh

clickhouse-gh Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing a494131a7 with master 229b8fcdf (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of 22c6d431f; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

137 translation units recompiled, 1406 s compile time in total, 137 of them have a recent master baseline.

Median compile-time ratio to the baselines is ×1.06 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio.
The matched translation units cost +62.9 s (+5%) in total before that adjustment.

Symbol sizes
Binary Symbol Master PR Δ
programs/clickhouse-keeper DB::DataLakeStorageSettingsTraits::Accessor::instance()::$_0::operator()() const new 99.37 KiB +99.37 KiB

Job report

Comment thread src/Core/Settings.cpp Resolved
Comment thread src/Core/Settings.cpp Resolved
@mintlify

mintlify Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
ClickHouse-docs 🟢 Ready View Preview Nov 4, 2026, 1:07 AM

@Algunenano Algunenano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good (automatic). Note that with the recent migration to inline settings history I think we don't need to add history for aliases, since they share it with the main definition, so we should not need to add something like: {"enable_database_materialized_postgresql", false, false, "Added an alias for setting allow_experimental_database_materialized_postgresql."},. Just rename it and add the alias.

If we do need to add it, we probably should improve the style check instead

@rschu1ze

rschu1ze commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

The PR kept running into conflicts. I'm re-doing it locally again. I'll keep the history changes in mind, tnx.

@rschu1ze

rschu1ze commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

Note that with the recent migration to inline settings history I think we don't need to add history for aliases, since they share it with the main definition, so we should not need to add something like: {"enable_database_materialized_postgresql", false, false, "Added an alias for setting allow_experimental_database_materialized_postgresql."},. Just rename it and add the alias.

Tests fail unfortunately. I'll restore the history within this PR. Let's do a sweep over all settings and their history to remove history entries for aliases in one go --> separate PR.

kewin-robetti pushed a commit to viasoftkorp/ClickHouse that referenced this pull request Oct 2, 2026
Apply the setting renames from ClickHouse#119949
on top of current master. "experimental" must no longer occur in setting names
(the tier already indicates this). The old names are kept as aliases via
`DECLARE_WITH_ALIAS`, and each renamed setting gets a 26.10 history record:

- `allow_experimental_database_materialized_postgresql` -> `enable_database_materialized_postgresql`
- `allow_experimental_database_hms_catalog` -> `enable_database_hms_catalog`
- `allow_experimental_kusto_dialect` -> `enable_kusto_dialect`
- `allow_experimental_prql_dialect` -> `enable_prql_dialect`
- `allow_experimental_polyglot_dialect` -> `enable_polyglot_dialect`
- `allow_experimental_cleanup_old_data_files_compaction` -> `enable_cleanup_old_data_files_compaction`
- `allow_experimental_expire_snapshots` -> `allow_expire_snapshots`
- `allow_experimental_ytsaurus_table_engine` -> `enable_ytsaurus_table_engine`
- `allow_experimental_ytsaurus_table_function` -> `enable_ytsaurus_table_function`
- `allow_experimental_ytsaurus_dictionary_source` -> `enable_ytsaurus_dictionary_source`
- `allow_experimental_paimon_storage_engine` -> `enable_paimon_storage_engine`
- `allow_experimental_object_storage_queue_hive_partitioning` -> `enable_object_storage_queue_hive_partitioning`
- `allow_experimental_database_paimon_rest_catalog` -> `enable_database_paimon_rest_catalog`
- `allow_experimental_eval_table_function` -> `enable_eval_table_function`

The settings history now lives inline in `Settings.cpp`, so the records were
added there instead of `SettingsChangesHistory.cpp`. Usages that appeared on
master after the PR branch point were renamed as well.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Apply the setting renames from #119949
on top of current master. "experimental" must no longer occur in setting names
(the tier already indicates this). The old names are kept as aliases via
`DECLARE_WITH_ALIAS`, and each renamed setting gets a 26.10 history record:

- `allow_experimental_database_materialized_postgresql` -> `enable_database_materialized_postgresql`
- `allow_experimental_database_hms_catalog` -> `enable_database_hms_catalog`
- `allow_experimental_kusto_dialect` -> `enable_kusto_dialect`
- `allow_experimental_prql_dialect` -> `enable_prql_dialect`
- `allow_experimental_polyglot_dialect` -> `enable_polyglot_dialect`
- `allow_experimental_cleanup_old_data_files_compaction` -> `enable_cleanup_old_data_files_compaction`
- `allow_experimental_expire_snapshots` -> `allow_expire_snapshots`
- `allow_experimental_ytsaurus_table_engine` -> `enable_ytsaurus_table_engine`
- `allow_experimental_ytsaurus_table_function` -> `enable_ytsaurus_table_function`
- `allow_experimental_ytsaurus_dictionary_source` -> `enable_ytsaurus_dictionary_source`
- `allow_experimental_paimon_storage_engine` -> `enable_paimon_storage_engine`
- `allow_experimental_object_storage_queue_hive_partitioning` -> `enable_object_storage_queue_hive_partitioning`
- `allow_experimental_database_paimon_rest_catalog` -> `enable_database_paimon_rest_catalog`
- `allow_experimental_eval_table_function` -> `enable_eval_table_function`

The settings history now lives inline in `Settings.cpp`, so the records were
added there instead of `SettingsChangesHistory.cpp`. Usages that appeared on
master after the PR branch point were renamed as well.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Dear @Algunenano, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself.

alexey-milovidov and others added 2 commits November 2, 2026 20:49
Conflict resolutions:
- `enable_kusto_dialect`: keep the `BETA` tier from master and the alias from this PR.
- Keep the new settings from master (`iceberg_orphan_files_min_retention_seconds`,
  `promql_max_points_per_series`, `promql_push_down_label_matchers`) next to the renamed ones.
- Keep master's updated descriptions and code (`max_query_size_for_query_text`, YTsaurus header check)
  with the new setting names.
- The alias history entries are now in 26.11, because the renames land in 26.11.
- Tests added on master that use the old names are switched to the new names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…p_old_data_files_compaction`

`enable_cleanup_old_data_files_compaction` of `DataLakeStorageSettings` is stored in the table
definition, so its previous name `allow_experimental_cleanup_old_data_files_compaction` is kept as an
alias (added in the previous merge commit), and the definitions written by older versions still load.
`ALTER TABLE ... MODIFY SETTING` and `RESET SETTING` on an Iceberg table can use either name.

`isSameSetting` now also resolves the aliases of `DataLakeStorageSettings`, so modifying the setting
under its other name replaces the existing entry of the definition instead of adding a second one.

Add a test which loads a definition written with the previous name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread src/Core/Settings.cpp
{"26.11", false, false, "Added an alias for setting `allow_experimental_database_hms_catalog`."}, \
{"25.5", false, false, "Allow experimental database engine DataLakeCatalog with catalog_type = 'hive'"}) \
DECLARE(Bool, allow_experimental_kusto_dialect, false, R"(
DECLARE_WITH_ALIAS(Bool, enable_kusto_dialect, false, R"(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Blocker: preserve the old serialized names for older peers

The alias preserves the old spelling on input, but BaseSettings::write emits the canonical name, and Connection::sendQuery does not translate it for older peers. For example, a client built from this PR running clickhouse-client --allow_experimental_kusto_dialect=1 --dialect=kusto --query 'print 1' against a pre-rename server now sends enable_kusto_dialect, even though the command uses the old option. That server skips the unknown setting, leaves allow_experimental_kusto_dialect disabled, and rejects the query with SUPPORT_IS_DISABLED.

This affects the other renamed settings through the same native serialization path as well. Please retain the old serialized names for older peers, or keep the old canonical names and introduce the new spellings as aliases. Add a focused new-client/old-server regression; retaining an input alias alone does not preserve this compatibility.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵 The incompatibility is real, but it is not specific to this PR. Every setting renamed with an alias has worked this way: pt. I (#119056, already merged), allow_experimental_analyzer -> enable_analyzer, allow_experimental_time_time64_type -> enable_time_time64_type, insert_distributed_sync -> distributed_foreground_insert, and others. In each case BaseSettings::write sends the canonical name, and Connection::sendQuery does not translate it based on server_revision. So a new client that sets a renamed, non-IMPORTANT setting against an older server has always had the setting ignored. For the gates renamed here, that surfaces as an explicit SUPPORT_IS_DISABLED error rather than silently wrong results, and the fix on the user's side is to set the setting server-side or in a profile.

There are two ways to avoid this, and both are larger, cross-cutting design decisions rather than part of this rename:

  • add revision-aware down-translation of aliased names in the native protocol, which would apply to all aliased settings;
  • keep the old canonical names, which contradicts the goal of removing experimental from setting names.

The PR is approved with the current approach, so I'm leaving this thread open for a maintainer to decide whether such a mechanism should be added in a separate change.

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Nov 4, 2026
Merged via the queue into master with commit 6fdefaa Nov 4, 2026
185 checks passed
@alexey-milovidov
alexey-milovidov deleted the alias-2 branch November 4, 2026 11:23
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 4, 2026
rschu1ze added a commit that referenced this pull request Nov 18, 2026

This branch was successfully deployed

1 active deployment
staging - docs — a494131a Deployed Nov 4, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-settings Settings & configuration infrastructure (server/user/query settings, profiles). pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants