Repository navigation
Conversation
…Info` `ReadFromFormatInfo::serialize` / `deserialize` did not carry the set that ClickHouse#130793 added. After a plan round trip the deserialized info has the logical `source_header`, the physical `format_header` and an empty set, so `ReadFromObjectStorageStep::supportsTopKDynamicFilter` again accepts a logical column against an unrelated physical column of the same name (with the mapping `k_old` -> `k`, `k` -> `v`), and the worker, which optimizes the deserialized plan again, arms the top-K filter on the wrong column. The set is written after the PREWHERE info as a marker byte '\1' and the sorted names, only when it is not empty: - every read without renamed columns keeps its exact bytes (measured: the empty-set serialization is byte-identical to master's); - an older reader refuses a stream with the set: it expects the closing "\n" and throws CANNOT_PARSE_INPUT_ASSERTION_FAILED on the marker, instead of reading the step without the exclusion; - the marker differs from '\n' because the size of a set of 10 names is the VarUInt byte 0x0A; - the names are sorted so the bytes are deterministic, also for the plan cache key. The only callers of these functions are the `ReadFromObjectStorageStep` serializers declared under CLICKHOUSE_CLOUD, whose step-version registration is outside this repository, so the trailer is used instead of a step version. Follow-up to ClickHouse#131029, review comment ClickHouse#131029 (comment) Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 3 findings; 1 full pass).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261113-010800 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-40:20261113-003800 |
|
Workflow [PR], commit [4b1290b] Summary: ✅
AI ReviewSummaryPreserves Missing context / blind spots
Final VerdictStatus: ✅ Approve |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes3 object files changed (+28.16 KiB total), 0 added.
711 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Slowest function optimization changes (ThinLTO)Median per-function time ratio to the master baseline:
Compile time of recompiled translation units7 translation units recompiled, 11 s compile time in total, 7 of them have a recent master baseline. |
Related: #131029
Related: #130793
Related: #124545
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Description
Follow-up to #131029, as asked in #131029 (comment) (review point #131029 (comment)).
ReadFromFormatInfo::columns_read_under_other_names(#130793) makesReadFromObjectStorageStep::supportsTopKDynamicFilterdecline the top-K filter for a Delta Lake column that is read under another column's physical name.ReadFromFormatInfo::serializeanddeserializedid not carry the set, so after a plan round trip the worker, which optimizes the deserialized plan again, matched the logicalkagainst the physicalkofk_old(the wrong result of #124545).The set is now written after the
PREWHEREinfo as a marker byte and the sorted names, only when it is not empty, so every other read keeps its exact bytes. An older reader refuses a stream with the set (CANNOT_PARSE_INPUT_ASSERTION_FAILEDat the closing newline) instead of reading it without the exclusion. The only callers of these two functions are theReadFromObjectStorageStep::serializeanddeserializedeclared underCLICKHOUSE_CLOUD, whose step version is registered outside this repository, so it is not bumped here.No SQL test reaches this code, so the test is a gtest of the round trip: the set of the #130793 test's mapping and a set of 10 names (its size byte is
'\n') survive it, and an empty set adds no bytes. Both tests fail on master and pass with the change; the bytes for an empty set are identical to master's.#131029 is marked
pr-must-backport, so this change should follow it to the same branches.Workflow [PR]
Sync PR [sync-upstream/pr/131173]