Skip to content

Cherry pick #118577 to 26.3: Write the empty statistics flag for bucketed Maps in JSON shared data - #124709

Merged
PedroTadim merged 8 commits into
backport/26.3/118577from
cherrypick/26.3/118577
Oct 12, 2026
Merged

PedroTadim merged 8 commits into
backport/26.3/118577from
cherrypick/26.3/118577

Conversation

@robot-ch-test-poll

Copy link
Copy Markdown
Contributor

Original pull-request #118577

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

rorylshanks and others added 8 commits September 7, 2026 15:41
Honor the existing statistics mode for `Map` reads. Advanced shared data
has no statistics; legacy prefixes omit the flag that corrected writers
include. Seek subsequent substreams using their recorded marks so both
layouts read correctly, including nested maps. Load marks lazily for
whole paths and read their metadata once per granule.

Keep all writers and serialization versions unchanged. Ordinary bucketed
`Map` columns and JSON `map_with_buckets` keep their existing behavior.

Add an actual pre-fix part regression covering full paths, subcolumns,
arrays of maps, nested JSON, and rewriting with the current writer.
It fails on the original CI binary and passes with the changed reader.

Related: #113022
Honor `read_statistics` in the shared `Map` reader while preserving the
released writer layout. Remove the extra statistics flag and the substream
seeking workaround introduced for it. Sequential compact readers now
consume exactly the bytes written, including without substream marks.

Cover compact reads, subcolumns, rewriting, and merging without indexes;
retain the real pre-fix part regression. Update the `Native` specification.

Related: #113022
After `INSERT SELECT` and `OPTIMIZE`, verify runtime types and typed
subcolumn reads for the legacy shared-data and compact-part regressions.
Both tests pass on the current PR binary at
`7801b63bde51d0ec5486a6ab01b6154ea4acc459`.

#113022 (comment)
#113022 (comment)
Only `StatisticsMode::NONE` omits both the presence flag and payload.
`StatisticsMode::PREFIX_EMPTY` writes a false flag without the payload.
These part-storage streams remain separate from the `Native` wire format.

#113022 (comment)
…son-shared

Write the empty statistics flag for bucketed Maps in JSON shared data
@robot-ch-test-poll robot-ch-test-poll added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default labels Oct 8, 2026
@robot-clickhouse-ci-2

Copy link
Copy Markdown
Contributor

Dear @Avogar, this cherry-pick PR has not been updated for 3d0h4m15s. Please resolve the conflicts to backport #118577, or close this PR if the backport is no longer needed. This PR will be automatically closed after 7 days of inactivity.

@PedroTadim
PedroTadim merged commit e59108a into backport/26.3/118577 Oct 12, 2026
177 of 182 checks passed
@PedroTadim
PedroTadim deleted the cherrypick/26.3/118577 branch October 12, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants