Skip to content

Fix CANNOT_COMPRESS with CODEC(T64) on a Map with bucketed serialization - #124695

Merged
rienath merged 4 commits into
masterfrom
fix-map-bucket
Oct 11, 2026
Merged

rienath merged 4 commits into
masterfrom
fix-map-bucket

Conversation

@rienath

@rienath rienath commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

The buckets_info and bucket_indexes streams of a bucketed Map had no type, so CODEC(T64) threw on merge. buckets_info now takes only generic codecs. bucket_indexes carries its UInt8 type, so T64 packs it to a quarter of the raw size. The adaptive codec also sees the type now and can pick T64.

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 into CHANGELOG.md):

Fix CANNOT_COMPRESS on merge or insert for a Map column with with_buckets serialization and CODEC(T64).


Workflow [PR]
Sync PR [sync-upstream/pr/124695]

Version info

  • Merged into: 26.10.1.2155-master (included in 26.10 and later)

@clickhouse-gh

clickhouse-gh Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b3997ae]

Summary: ✅


AI Review

Summary

This PR fixes codec selection for bucketed Map substreams by treating m.buckets_info as a structural stream that only inherits generic codecs and by propagating the concrete integer type to m.bucket_indexes, which lets CODEC(T64) resolve against that stream correctly. I did not find a correctness, safety, or performance issue in the current patch.

Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-bugfix Pull request with bugfix, not backported by default comp-map-datatype Map datatype implementation and semantics. labels Oct 8, 2026
@clickhouse-gh

clickhouse-gh Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing b3997aed9 with master 2079ed3d5 (stripped binary size, per-symbol sizes and ThinLTO time; object sizes against the warmup build of dca38d441; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

8 translation units recompiled, 30 s compile time in total, 8 of them have a recent master baseline.

Job report

@azat azat self-assigned this Oct 9, 2026
@rienath
rienath added this pull request to the merge queue Oct 11, 2026
Merged via the queue into master with commit 4ddbbbd Oct 11, 2026
166 checks passed
@rienath
rienath deleted the fix-map-bucket branch October 11, 2026 21:03
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-map-datatype Map datatype implementation and semantics. pr-bugfix Pull request with bugfix, not backported by default pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants