Fix endianness in `QBit` binary serialization by rienath · Pull Request #101378 · ClickHouse/ClickHouse · GitHub
Skip to content

Fix endianness in QBit binary serialization#101378

Merged
rienath merged 3 commits into
masterfrom
fix-qbit-serialization-endianness
Apr 1, 2026
Merged

Fix endianness in QBit binary serialization#101378
rienath merged 3 commits into
masterfrom
fix-qbit-serialization-endianness

Conversation

@rienath

@rienath rienath commented Mar 31, 2026

Copy link
Copy Markdown
Member

SerializationQBit used native-endian writeBinary/readBinary for float elements in RowBinary format. On a big-endian platform this would produce corrupt data that cannot be read back by a little-endian node (or vice versa). All other numeric serializations use explicit little-endian encoding.

Changelog category (leave one):

  • Backward Incompatible Change

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Fix endianness of QBit binary serialization to use little-endian format.

Version info

  • Merged into: 26.4.1.491

@rienath rienath changed the title Fix endianness in QBit binary serialization Fix endianness in QBit binary serialization Mar 31, 2026
@clickhouse-gh

clickhouse-gh Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

@clickhouse-gh clickhouse-gh Bot added the pr-improvement Pull request with some product improvements label Mar 31, 2026
Comment thread src/DataTypes/Serializations/SerializationQBit.cpp
@rienath rienath requested a review from Avogar April 1, 2026 10:10
@rienath rienath marked this pull request as ready for review April 1, 2026 10:10
@clickhouse-gh

clickhouse-gh Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.00% 84.00% +0.00%
Functions 90.90% 90.90% +0.00%
Branches 76.50% 76.50% +0.00%

Changed lines: 100.00% (25/25) · Uncovered code

Full report · Diff report

@Avogar Avogar self-assigned this Apr 1, 2026
@rienath

rienath commented Apr 1, 2026

Copy link
Copy Markdown
Member Author

@rienath rienath added this pull request to the merge queue Apr 1, 2026
Merged via the queue into master with commit 697039e Apr 1, 2026
160 of 163 checks passed
@rienath rienath deleted the fix-qbit-serialization-endianness branch April 1, 2026 13:57
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Apr 1, 2026
@fm4v

fm4v commented Apr 13, 2026

Copy link
Copy Markdown
Member

@rienath any way to make it backward compatible? it's GA in 26.2 and this fix will land in 26.4

@rienath

rienath commented Apr 13, 2026

Copy link
Copy Markdown
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-improvement Pull request with some product improvements 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.

4 participants