Skip to content

Antalya 25.8 Backport of #123436 - Fix ALIAS row policies on legacy distributed reads - #2502

Merged
mkmkme merged 2 commits into
antalya-25.8from
backports/antalya-25.8/123436
Oct 9, 2026
Merged

mkmkme merged 2 commits into
antalya-25.8from
backports/antalya-25.8/123436

Conversation

@mkmkme

@mkmkme mkmkme commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Fix ALIAS row policies on legacy distributed reads

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

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

Fix a bug where using aliases and row policies with enable_analyzer=0 could error out (ClickHouse#123436 by @mkmkme)

Documentation entry for user-facing changes

...

CI/CD Options

Exclude tests:

  • Fast test
  • Integration Tests
  • Stateless tests
  • Stateful tests
  • Unit tests
  • Performance tests
  • Aarch64 tests
  • All with ASAN
  • All with TSAN
  • All with MSAN
  • All with UBSAN
  • All with Coverage
  • All Regression
  • Disable CI Cache

Regression jobs to run:

  • Fast suites (mostly <1h)
  • Aggregate Functions (2h)
  • Alter (1.5h)
  • Benchmark (30m)
  • CAS (content-addressed storage; Antalya only)
  • ClickHouse Keeper (1h)
  • Iceberg (2h)
  • LDAP (1h)
  • OAuth (5m)
  • Parquet (1.5h)
  • RBAC (1.5h)
  • SSL Server (1h)
  • S3 (2h)
  • S3 Export (2h)
  • Swarms (30m)
  • Tiered Storage (2h)

…-distributed-26.8

26.8: Fix `ALIAS` row policies on legacy distributed reads
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Workflow [PR], commit [5df4ff0]

@mkmkme

mkmkme commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

@blau-ai

@blau-ai

blau-ai commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

CI triage — all failures are unrelated to this PR

Verdict: 4 distinct failures, 0 PR-caused. One is a pre-existing stress/fuzzer crash (known analyzer bug), one is a regression-suite snapshot that the already-merged Parquet-UUID backport changed, and two are base-image CVE scans. Every stateless/integration/build check — including the new test 05316_row_policy_alias_column_distributed and its flaky check — is green. This PR only changes src/Interpreters/InterpreterSelectQuery.cpp and adds the one test, so none of the failing code paths are touched by it.


1. Stress test (amd_ubsan) — ❌ not PR-caused (pre-existing fuzzer crash)

Server aborted on a LOGICAL_ERROR:

Logical error: 'Unexpected return type from concat. Expected Nullable(String). Got String.'
  at src/Interpreters/ExpressionActions.cpp:673
query: SELECT concat(`__table2`.`id`, '_1') AS `id`, `__table1`.`val`
       FROM t1 ALL LEFT JOIN t2 ON ... ALL LEFT JOIN t3 USING (id) ORDER BY val
  • The crashing query is a multi-LEFT JOIN with concat + join_use_nulls — no row policy and no ALIAS-column read, so neither of this PR's code paths (replaceAliasColumnsInQuery on the policy filter, get_prewhere_columns(include_row_level_filter=…)) is reached. row_policy_filter_expression/row_level_filter are null here.
  • This is a known upstream analyzer/fuzz bug: ClickHouse/ClickHouse#87016 "Unexpected return type from concat. Expected String. Got Nullable(String)" (labels: bug, fuzz, analyzer).
  • Next step: safe to re-run; the crash is a pre-existing fuzzer find, not a regression from this backport.

2. Regression x86 parquet / RegressionTestsRelease / Parquet — ❌ not PR-caused (stale snapshot from the Parquet-UUID backport)

1 of 39 features failed: /parquet/datatypes/supporteduuid, a TestFlows snapshot mismatch:

name=uuid_2_structure
- 'u\tNullable(FixedString(16))'   (snapshot)
+ 'u\tNullable(UUID)'              (actual)
  • Parquet now imports UUID columns as Nullable(UUID) instead of Nullable(FixedString(16)). That behavior comes from Antalya 25.8 - Backport of #99521 Parquet UUID support #2446 "Add UUID inference and export support for Parquet and Arrow formats" (commit 80463d61104), already merged into the base branch antalya-25.8 — independent of this PR, which touches no Parquet/Arrow code.
  • Next step: the regression snapshot parquet/tests/snapshots/outline.py.datatypes_above_24_antalya.snapshot needs updating to Nullable(UUID) as a follow-up to the UUID backport (belongs with Antalya 25.8 - Backport of #99521 Parquet UUID support #2446, not here). Not actionable on this PR.

3 & 4. GrypeScanKeeper / GrypeScanServer (-alpine) — ❌ not PR-caused (base-image CVEs)

Grype reports 4 high/critical (keeper) and 1 high/critical (server-alpine) vulnerabilities in the built Docker images. These are CVEs in the base image / bundled OS packages; a C++ change to InterpreterSelectQuery.cpp cannot introduce or remove them. Pre-existing/infra, tracked by the platform/security workflow.


Health check

The functional change — evaluating ALIAS columns used by row policies before the read filter on legacy (SQL-text) distributed reads, and keeping row-level-filter inputs out of the PREWHERE alias set — is well covered: the new 05316_row_policy_alias_column_distributed test passed in amd_asan/debug/ubsan (parallel & sequential), the s3/DatabaseReplicated/ParallelReplicas variants, and the dedicated flaky check. All builds, unit, stateless and integration suites are green. The four red checks are environmental/pre-existing and unrelated to the diff, so no code change is needed on this PR; re-running the stress job will clear the transient crash, and the Parquet snapshot/Grype items are owned by other workflows.

@mkmkme
mkmkme merged commit f0c938a into antalya-25.8 Oct 9, 2026
234 of 243 checks passed
@mkmkme mkmkme added the verified Approved for release label Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants