Make the Alias table engine non-experimental by alexey-milovidov · Pull Request #103488 · ClickHouse/ClickHouse · GitHub
Skip to content

Make the Alias table engine non-experimental#103488

Merged
alexey-milovidov merged 30 commits into
masterfrom
alias-engine-non-experimental
May 19, 2026
Merged

Make the Alias table engine non-experimental#103488
alexey-milovidov merged 30 commits into
masterfrom
alias-engine-non-experimental

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Apr 24, 2026

Copy link
Copy Markdown
Member

The Alias table engine is now production-ready, so drop the allow_experimental_alias_table_engine gate on CREATE TABLE ... ENGINE = Alias(...). The setting itself is moved to OBSOLETE_SETTINGS so existing profiles and queries that set it continue to parse without error.

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

The Alias table engine is now non-experimental and available without the allow_experimental_alias_table_engine setting.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.5.1.833

The `Alias` table engine is now production-ready.

The setting `allow_experimental_alias_table_engine` is moved to
`OBSOLETE_SETTINGS` so existing profiles and queries that set it continue
to parse without error.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@clickhouse-gh

clickhouse-gh Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Apr 24, 2026
@alexey-milovidov

Copy link
Copy Markdown
Member Author

Blocked by #103118

alexey-milovidov and others added 2 commits April 24, 2026 14:13
…ttings

The setting is now obsolete, not removed — it still parses and is a no-op.
`enableAllExperimentalSettings` is used by `DatabaseReplicated::recoverLostReplica`
to re-create tables when the original CREATE settings are unavailable, so it
should also set obsolete experimental gates (matching `allow_experimental_window_functions`,
`allow_experimental_map_type`, `allow_experimental_vector_similarity_index`, etc.).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread src/Core/SettingsChangesHistory.cpp Outdated
…le_engine`

The setting is now obsolete and no longer consulted at runtime, so the
`compatibility` setting cannot restore the pre-26.5 behavior of requiring
`allow_experimental_alias_table_engine = 1`. The history entry was
operationally a no-op. Set the obsolete default back to `false` so the
default value matches the 26.4 baseline and no transition is required in
`SettingsChangesHistory.cpp`.

Addresses review feedback on #103488
…perimental

# Conflicts:
#	src/Storages/StorageAlias.cpp
Comment thread src/Storages/StorageAlias.cpp
alexey-milovidov and others added 18 commits April 29, 2026 11:09
…as_table_engine`

Addresses review feedback on #103488:
the existing `03636_storage_alias_*` tests still set
`allow_experimental_alias_table_engine = 1` first, so the new default
path (where the setting is no longer required) was untested.

The test creates an `Alias` table without the flag, then verifies that
the obsolete setting still parses as a no-op for both `1` and `0`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Master has three other tests with the `04141_` prefix
(`04141_array_lowcard_arithmetic_monotonicity`,
`04141_divide_by_zero_constant_monotonicity`,
`04141_windowID_with_timezone_string`) added concurrently. Bump our
new test to the next available number for clarity.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Master has two more tests with the `04145_` prefix added concurrently
(`04145_h3_polygon_to_cells_invalid_type`,
`04145_url_glob_parallelize_output`). Bump our new test to the next
available number for clarity.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The entry recorded `allow_experimental_alias_table_engine` as a no-op
change (`false -> false`) for `26.5`, but with the runtime check now
removed from `StorageAlias`, the `compatibility` setting can no longer
restore pre-`26.5` behavior anyway. Drop the entry to avoid implying a
compatibility guarantee that the code does not provide.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…perimental

# Conflicts:
#	src/Core/Settings.cpp
@alexey-milovidov

Copy link
Copy Markdown
Member Author

@groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=103488&sha=e19f797220055d6bf832847454ee60c545557f20&name_0=PR&name_1=Unit%20tests%20%28tsan%2C%20function_prop_fuzzer%29 and provide a fix in a separate PR.

The FunctionsStress.stress failure is a function-prop fuzzer non-determinism finding (caseWithExpression over Date32/DateTime64), unrelated to this PR which only flips Alias table engine out of experimental. It is tracked in #104877.

@alexey-milovidov

Copy link
Copy Markdown
Member Author

@groeneai, the remaining CI failures look unrelated to this PR:

@@ -330,11 +328,6 @@ void registerStorageAlias(StorageFactory & factory)

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.

This hunk makes CREATE TABLE ... ENGINE = Alias(...) generally available, but AliasSink::consume still creates a fresh InterpreterInsertQuery per chunk. With insert_deduplication_token, multi-block inserts through Alias can still deduplicate away blocks 2..N (silent row loss).

That issue is tracked in #103118, and the fix PR #103246 is still open/draft.

Please keep Alias behind the experimental gate until that write-path fix lands, or merge the onStart/single-pipeline fix with its regression test in this PR.

@groeneai

Copy link
Copy Markdown
Contributor

@alexey-milovidov — confirmed, both items are tracked under in‑flight fixes:

1. FunctionsStress.stress (isDistinctFrom(String, FixedString) + caseWithExpression) → #104877

The umbrella covers two distinct code paths, each fixed by a separate PR:

  • isDistinctFrom / isNotDistinctFrom (String vector vs constant FixedString), plus the if(...) / nullIf(...) cross-type variants → fixed by Fix more non-deterministic function results found by the functions stress test #104858 (@Algunenano, OPEN). Adds stringVectorConstantFixedString in FunctionsComparison.h so String-vector × FixedString-constant goes through memcmpSmallLikeZeroPaddedAllowOverflow15 (zero-padded comparison), aligning the constant path with the String vs FixedString vector path; adds castForIf in src/Functions/if.cpp to keep the const-cond fast path consistent with the non-const FixedStringSource → StringSink path so const-folding the condition cannot flip the result. This is exactly the pattern you pointed at on this PR.
  • caseWithExpression / transform (FixedString / Enum / Date32 / DateTime64) → fixed by Fix transform default-branch conversion bug (FixedString / Enum) #104804 (groeneai, OPEN). The cache->default_column was built via the Field round-trip which loses information for some destination types (different from castColumn semantics). The PR forwards the default through castColumn + cloneResized(1) at the wrapper layer, so all destination type variants converge.

Both PRs target the same root pattern (FixedString NUL‑padding handling differs across const-vs-non-const dispatch and across the Field round-trip), and together cover every shape seen so far in #104877 (9 distinct function shapes + sub-family A vs B classification, latest tracker in the issue thread).

2. 01548_query_log_query_execution_ms (amd_msan WasmEdge timeout) → tracked under #104866

This belongs to the chronic Stateless tests (amd_msan, WasmEdge, *) SYSTEM FLUSH LOGS query_log / per-test timeout family (11+ distinct tests across the lane in the last 14 days, several with master hits). Root cause was identified by @Algunenano on #104866 (2026-05-14T13:54:22Z): the x86v3 baseline ISA flip puts __msan_chain_origin on a hot path where LLVM inserts vzeroupper around every AVX2/SSE boundary, pushing wall‑time over the 180s flush threshold. His patch is incoming. The in‑job rerun pass you observed on this PR (All reruns passed. The failure is not reproducible (likely a transient issue).) matches that root cause — the lane is borderline, so any same‑run reschedule clears it.

No follow‑up action requested on the Alias PR — both workstreams are owned and active.

@clickhouse-gh

clickhouse-gh Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.10% +0.00%
Functions 92.00% 92.00% +0.00%
Branches 76.60% 76.50% -0.10%

Changed lines: 100.00% (22/22) · Uncovered code

Full report · Diff report

@alexey-milovidov alexey-milovidov self-assigned this May 19, 2026
@alexey-milovidov alexey-milovidov added this pull request to the merge queue May 19, 2026
Merged via the queue into master with commit f18c391 May 19, 2026
329 of 330 checks passed
@alexey-milovidov alexey-milovidov deleted the alias-engine-non-experimental branch May 19, 2026 14:50
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements 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.

3 participants