Skip to content

Backport #90880 to 25.11: Add setting for compatibility serialziation of string - #91329

Merged
antonio2368 merged 1 commit into
25.11from
backport/25.11/90880
Dec 5, 2025
Merged

antonio2368 merged 1 commit into
25.11from
backport/25.11/90880

Conversation

@robot-ch-test-poll

Copy link
Copy Markdown
Contributor

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

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-ch-test-poll robot-ch-test-poll 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 [8e0f96b]

Summary: ❌

job_name test_name status info comment
Integration tests (amd_asan, db disk, old analyzer, 1/6) failure
test_storage_s3_queue/test_parallel_inserts.py::test_parallel_inserts_with_failures[1] FAIL cidb

@antonio2368
antonio2368 requested a review from Copilot December 5, 2025 08:52

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 implements a new setting serialize_string_in_memory_with_zero_byte to control string serialization behavior during aggregation, enabling compatibility between ClickHouse versions. When enabled (default: true), strings are serialized with a trailing zero byte, maintaining compatibility with version 25.6 and earlier. The change affects string serialization in aggregation operations and related data structures.

Key Changes

  • Added new boolean setting serialize_string_in_memory_with_zero_byte with default value true
  • Modified column serialization interfaces to accept SerializationSettings parameter throughout the codebase
  • Updated aggregation methods and processors to propagate the setting through the serialization pipeline

Reviewed changes

Copilot reviewed 73 out of 74 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Core/Settings.cpp Adds the new setting definition and documentation
src/Core/SettingsChangesHistory.cpp Records the setting in version history for 25.11 and 25.8
src/Columns/IColumn.h Introduces SerializationSettings struct and updates serialization method signatures
src/Columns/ColumnString.cpp Implements conditional zero-byte serialization based on setting
src/Interpreters/Aggregator.h/cpp Adds setting to aggregator parameters and applies it during key serialization
src/Common/ColumnsHashing.h Creates context for serialized hash methods with the setting
src/Interpreters/AggregationMethod.h/cpp Updates method signatures to accept serialization settings
tests/integration/test_string_aggregation_compatibility/test.py Adds integration tests verifying compatibility behavior
Multiple Column implementations Updates all column types to support the new serialization interface
Multiple aggregate functions Updates to use the new serialization settings for aggregation state

Comment thread src/Core/SettingsChangesHistory.cpp Resolved
Comment thread src/Core/SettingsChangesHistory.cpp Resolved
Comment thread src/Columns/ColumnString.cpp Resolved
@antonio2368
antonio2368 merged commit df51a45 into 25.11 Dec 5, 2025
@antonio2368
antonio2368 deleted the backport/25.11/90880 branch December 5, 2025 16:52
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.

5 participants