Repository navigation
Clarify the native protocol docs for revision 54494 (-Merge state versions) - #125115
Conversation
The rows describing `DBMS_MIN_REVISION_WITH_MERGE_COMBINATOR_STATE_VERSION` in `format.mdx` and `protocol.mdx` said that a `-Merge` state is written at version 0 "whatever version the function it merges has", without naming the column type, without saying that the version belongs to that type rather than to the merged function, and without describing the reader. Each row now names the full type of the partial state a shard sends for a distributed `quantileDeterministicMerge`, states both directions below the revision (written at version 0; a type string with no outer version is read at version 0), and says that a version spelled in the argument type does not apply to the payload. The protocol row also notes that the binary type encoding always carries the version. Checked on a debug build of master over HTTP with `client_protocol_version` 54490/54492/54493/54494 (type strings, binary type encoding, payload bytes) and with a distributed `quantileDeterministicMerge` against 26.9.9.28 in both directions. Requested in ClickHouse#123070 (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; 0 findings) plus my own cold review (2 nits). Every claim of the two rows was checked against
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-10:20261010-230600 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-4:20261010-224600 |
|
Workflow [PR], commit [64c8049] Summary: ✅ AI ReviewSummaryThis PR tries to clarify revision Findings
Final Verdict❌ Changes required before merge: the PR’s central clarification still misstates the actual wire type for distributed |
The state of a -Merge function is read at the version of the outer AggregateFunction, not at the version spelled inside its argument type. Below 54494 that outer version is 0, which is what 26.9 sends: for a 3-row quantileDeterministicMerge state, 26.9.9.28 at revision 54492 and master at 54493 send the same type string and the same 64-byte payload, while master at 54494 spells the outer `1` and adds the 1-byte skip_degree. State this first, with the example type, in both tables. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #123070
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Description
Follow-up to #123070, as requested in #123070 (comment): a clearer description of
54494.Each
54494row informat.mdxandprotocol.mdxnow starts with the rule: the state of a-Mergefunction itself is read at the version of the outerAggregateFunction, not at the version inside its argument type. It then shows the type a shard sends for a distributedquantileDeterministicMergebelow and from54494.Docs only. Checked over HTTP with
client_protocol_version: master at54493and 26.9.9.28 at54492send the same type string, with no outer version, and a byte-identical payload withoutskip_degree; master at54494spells the outer1and adds that byte.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/125115]
Version info
26.10.1.2230-master(included in26.10and later)