Skip to content

Fix null representation in serialization of replicated and sparse columns - #102888

Merged
m-selmi merged 1 commit into
ClickHouse:masterfrom
m-selmi:fix-special-columns-null-serialization
Apr 16, 2026
Merged

m-selmi merged 1 commit into
ClickHouse:masterfrom
m-selmi:fix-special-columns-null-serialization

Conversation

@m-selmi

@m-selmi m-selmi commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

SerializationReplicated (and also SerializationSparse) did not have an override for serializeTextRaw and would fall back serializeText which led to not respecting settings like format_tsv_null_representation.
This change adds the overrides and adjusts the affected tpcds test references

Closes #95168

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):

Make null representation in serialization of replicated and sparse columns respect settings (e.g. format_tsv_null_representation)

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.4.1.1002

@clickhouse-gh

clickhouse-gh Bot commented Apr 16, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [4cfe04b]

Summary: ✅


AI Review

Summary

This PR fixes TabSeparatedRaw null rendering for columns using SerializationReplicated and SerializationSparse by adding explicit serializeTextRaw/deserializeTextRaw overrides and updating stateless tests. I reviewed the serialization changes and test updates for correctness, safety, and compatibility, and did not find actionable issues.

ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
No large/binary files ✅
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Apr 16, 2026
@evillique evillique self-assigned this Apr 16, 2026
@clickhouse-gh

clickhouse-gh Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.10% +0.00%
Functions 90.90% 90.90% +0.00%
Branches 76.60% 76.60% +0.00%

Changed lines: 35.71% (5/14) | lost baseline coverage: 2 line(s) · Uncovered code

Full report · Diff report

@m-selmi
m-selmi added this pull request to the merge queue Apr 16, 2026
Merged via the queue into ClickHouse:master with commit 1f08686 Apr 16, 2026
472 of 475 checks passed
@m-selmi
m-selmi deleted the fix-special-columns-null-serialization branch April 16, 2026 17:44
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Apr 16, 2026
@clickgapai

Copy link
Copy Markdown
Contributor

Hi — this PR may need backporting to 26.3 (LTS), 26.2, 26.1, but no backport label was found.

Affected code: SerializationReplicated::serializeTextRaw and SerializationSparse::serializeTextRaw — introduced in 25.10.

Why: allow_special_serialization_kinds_in_output_formats was enabled by default in 25.11 (SettingsChangesHistory.cpp). SerializationReplicated was introduced in 25.10. Both features exist in 26.1, 26.2, and 26.3 branches. The 25.8 branch predates both features and is not affected.

Other supported branches (25.8) predate 25.10 and do not contain this code.

If this should be backported, consider adding pr-must-backport or a version-specific label (e.g. v26.3-must-backport). Ignore this if backporting is not applicable.

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

Labels

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.

format_tsv_null_representation setting is sometimes ignored with TabSeparatedRaw format

4 participants