Skip to content

Backport #90880 to 25.9: Add setting for compatibility serialziation of string - #91321

Merged
clickhouse-gh[bot] merged 2 commits into
25.9from
backport/25.9/90880
Dec 5, 2025
Merged

clickhouse-gh[bot] merged 2 commits into
25.9from
backport/25.9/90880

Conversation

@robot-clickhouse

Copy link
Copy Markdown
Member

Original pull-request #90880
Cherry-pick pull-request #91301

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

@robot-clickhouse robot-clickhouse added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default labels Dec 2, 2025
@clickhouse-gh

clickhouse-gh Bot commented Dec 2, 2025 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [9acf51f]

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR backports a new setting serialize_string_in_memory_with_zero_byte to version 25.9 to maintain compatibility when querying clusters with mixed versions. The setting controls whether String values are serialized with a trailing zero byte during aggregation.

Key Changes:

  • Adds a new boolean setting serialize_string_in_memory_with_zero_byte (default: true)
  • Threads the setting through serialization/deserialization call chains
  • Updates all column serialization methods to accept an optional SerializationSettings parameter
  • Removes duplicate serializeAggregationStateValueIntoArena methods in favor of unified serialization

Reviewed changes

Copilot reviewed 70 out of 71 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Core/Settings.cpp Adds the new serialize_string_in_memory_with_zero_byte setting definition
src/Core/SettingsChangesHistory.cpp Records the setting in version history for 25.8 and 25.9
src/Columns/IColumn.h Introduces SerializationSettings struct and updates method signatures
src/Columns/ColumnString.cpp Implements conditional zero-byte serialization based on setting
src/Interpreters/Aggregator.h/cpp Adds setting parameter to Params constructors
src/Common/ColumnsHashing.h Creates HashMethodSerializedContext to pass settings through hash methods
tests/integration/test_string_aggregation_compatibility/test.py Adds integration tests for cross-version compatibility
Multiple column implementation files Updates all column types to pass SerializationSettings through call chains
Multiple aggregation files Updates aggregation functions to use unified serialization with compatibility settings

Comment thread src/Core/SettingsChangesHistory.cpp Resolved
Comment thread src/Core/SettingsChangesHistory.cpp Resolved
Comment thread src/Columns/IColumn.h Resolved
Comment thread src/Columns/ColumnObjectDeprecated.h Resolved
@clickhouse-gh
clickhouse-gh Bot merged commit 0584c71 into 25.9 Dec 5, 2025
@clickhouse-gh
clickhouse-gh Bot deleted the backport/25.9/90880 branch December 5, 2025 11:41
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-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants