Skip to content

Backport #131789 to 26.10: Check the aggregates of deserialized query plan steps against their input - #133176

Merged
clickhouse-gh[bot] merged 4 commits into
26.10from
backport/26.10/131789
Nov 23, 2026
Merged

clickhouse-gh[bot] merged 4 commits into
26.10from
backport/26.10/131789

Conversation

@robot-ch-test-poll

@robot-ch-test-poll robot-ch-test-poll commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Original pull-request #131789

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.10.11.12

@robot-ch-test-poll robot-ch-test-poll added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-critical-bugfix labels Nov 20, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [443f71c]

Summary: ✅

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 The only failure here (ASan heap-buffer-overflow in readEscapedStringIntoImpl, buffer allocated by ReadBufferFromAzureBlobStorage, followed by the server liveness failure) is unrelated to this backport. It was fixed on master by #127593, which was not backported to 26.10. I opened that backport in #133226. Report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=133176&sha=14e68aa1bdb5b1fe07c40ed4f0f31c1e852d1ff4&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20distributed%20plan%2C%20parallel%29

@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 The fix for the only failure (ASan heap-buffer-overflow on the buffer owned by ReadBufferFromAzureBlobStorage) has landed on 26.10 via #133226, so I merged 26.10 into this branch (bd07ec0) to pull it in. The merge was clean, and 26.10 did not touch any of the files changed here.

alexey-milovidov and others added 2 commits November 23, 2026 01:51
…version 20

The test was backported from master, where `DBMS_QUERY_PLAN_SERIALIZATION_VERSION` is 21.
On 26.10 the last supported version is 20, so every forged plan was rejected with
`NOT_IMPLEMENTED` before reaching the `deserialize` of a step.

Pinning the version is not enough here, unlike in `05790_filling_step_repeated_interpolate_output`:
three cases pass the `distributed_aggregation_memory_efficient` setting of the step, and version 21
changed the encoding of the step settings from binary (the number of settings, then name, flags and
the binary value of each) to names with string values terminated by an empty name. The test now
writes the settings in the binary form of version 20. Without settings the bytes are the same.

Checked against the `arm_release` binary built by CI for bd07ec0: the output matches the reference.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=133176&sha=bd07ec0e8600465c90057fc4a9c760bb44409531&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20distributed%20plan%2C%20parallel%29
PR: #133176

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 The only failure was the test of this backport itself, 05791_aggregating_step_argument_types: it forged plans at DBMS_QUERY_PLAN_SERIALIZATION_VERSION 21 (master), while 26.10 supports at most 20, so every plan was rejected with NOT_IMPLEMENTED. Fixed in 426b92c: the test now writes version 20, including the binary encoding of the step settings that version 20 uses (version 21 switched them to names with string values). Verified against the arm_release binary built by CI for bd07ec0 - the output matches the reference. Also merged the latest 26.10 (clean, no changes to the files of this PR). Report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=133176&sha=bd07ec0e8600465c90057fc4a9c760bb44409531&name_0=BackportPR&name_1=Stateless%20tests%20%28amd_asan_ubsan%2C%20distributed%20plan%2C%20parallel%29

@clickhouse-gh
clickhouse-gh Bot merged commit 270407b into 26.10 Nov 23, 2026
52 of 54 checks passed
@clickhouse-gh
clickhouse-gh Bot deleted the backport/26.10/131789 branch November 23, 2026 03:56
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! pr-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants