Skip to content

Backport #102330 to 26.4: Use detachColumns instead of getColumns in Aggregator merge path - #109279

Merged
fm4v merged 1 commit into
26.4from
backport/26.4/102330
Jul 3, 2026
Merged

fm4v merged 1 commit into
26.4from
backport/26.4/102330

Conversation

@robot-ch-test-poll3

@robot-ch-test-poll3 robot-ch-test-poll3 commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #102330

This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.

The PR source

The PR is created in the CI job

Version info

  • Merged into: 26.4.5.100

@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backport Changes, backported to release branch. Do not use manually - automated use only! label Jul 3, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jul 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [29c103b]

Summary: ⏳

job_name test_name status info comment
Stateless tests (amd_asan_ubsan, distributed plan, parallel, 1/2) FAIL
04146_iceberg_orc_row_policy_prewhere FAIL cidb

@alexey-milovidov

Copy link
Copy Markdown
Member

The one red check on this backport — Stateless tests (amd_asan_ubsan, distributed plan, parallel, 1/2), failing test 04146_iceberg_orc_row_policy_prewhere — is unrelated to this backport and is a pre-existing flaky test on the release branches.

This backport touches only the aggregation merge path (src/Interpreters/Aggregator.cpp, getColumns -> detachColumns, identical to the merged #102330). The failing test exercises Iceberg ORC storage with PREWHERE, and fails with:

Code: 182. DB::Exception: Storage IcebergLocal (...) does not support PREWHERE. (ILLEGAL_PREWHERE)
(query: SELECT sum(toInt64(c1)) FROM t_ice_orc_rp_pw PREWHERE c0 > 10
        SETTINGS input_format_parquet_use_native_reader_v3 = 1, enable_analyzer = 1)

CIDB history over the last 21 days shows it flaking across many unrelated PRs, disproportionately on the release branches:

base_ref FAIL OK
26.4 10 66
26.3 4 72
master 8 51236

There is no open tracking issue for it.

@groeneai, please investigate this flaky test (04146_iceberg_orc_row_policy_prewhere, ILLEGAL_PREWHERE on the native parquet reader v3 path for IcebergLocal) and provide a fix in a separate PR. If a fix is already in progress, please link it here.

Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109279&sha=29c103b85927973bafe725a60c1cb53ce3003ca3&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20distributed%20plan%2C%20parallel%2C%201%2F2%29

@fm4v
fm4v merged commit 35eaa3a into 26.4 Jul 3, 2026
30 of 34 checks passed
@fm4v
fm4v deleted the backport/26.4/102330 branch July 3, 2026 13:55
@groeneai

groeneai commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

A fix is already in progress: #107970 (open, targets master).

Root cause (release-branch-only). StorageObjectStorage caches supportsPrewhere() at CREATE-TABLE time, and for format Parquet that value comes from input_format_parquet_use_native_reader_v3. The test's CREATE TABLE ... ENGINE = IcebergLocal(..., 'Parquet') does not pin the setting, so a randomized session with input_format_parquet_use_native_reader_v3 = 0 bakes supports_prewhere = false into the storage object permanently. The later SELECT ... PREWHERE then raises ILLEGAL_PREWHERE at analysis time even though it pins v3 = 1 in its own SETTINGS — too late, the storage cached the value at CREATE. That is exactly why your example query fails despite v3 = 1.

Why master is clean. Commit 80f3bb8 made input_format_parquet_use_native_reader_v3 obsolete and removed it from tests/clickhouse-test randomization, so master never exercises the v3 = 0 path. On 26.3/26.4 the setting is still live and still randomized to 0 (probability ~1/6), so the failure is deterministic at ~1/6. CIDB over 21d, split by the branch head (not base_ref): actual master head is 0 FAIL / 7750 OK; the 8 failures grouped under base_ref = master are PR #102499 (feature/add-parquet-variant-support), not master head.

Fix (#107970). Pin SET input_format_parquet_use_native_reader_v3 = 1; in the test's CREATE-TABLE block (+3 lines, test-only). Validated in both directions: the runner with --input_format_parquet_use_native_reader_v3=0 gives 206 FAIL, dropping to 0 with the pin; --test-runs 40 with randomization on gives 40/40 OK. It is a no-op on master (the setting is obsolete there), so it carries to 26.3/26.4 through the normal backport flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants