Skip to content

Enable sparse serialization independently for typed paths declared inside JSON columns. - #111429

Merged
alexey-milovidov merged 114 commits into
ClickHouse:masterfrom
rorylshanks:codex/sparse-json-typed-paths
Nov 22, 2026
Merged

alexey-milovidov merged 114 commits into
ClickHouse:masterfrom
rorylshanks:codex/sparse-json-typed-paths

Conversation

@rorylshanks

@rorylshanks rorylshanks commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Typed paths make frequently queried JSON fields behave like regular columns, but they are currently serialized densely even when absent from almost every row. Dense defaults compress well on disk, yet scans must still decompress and materialize them.

This PR adds with_subcolumns part metadata and lets each directly declared typed path use the existing sparse serialization independently. A rare path can be sparse while other paths in the same JSON column stay dense. A JSON element of a top-level Tuple column is covered too. JSON nested in Array, Nullable, or Map remains valid, but its typed paths stay dense and are not optimized by with_subcolumns.

The Native format remains unchanged. Typed paths are materialized dense before writing, so this PR adds no protocol revision or recursive wire metadata.

On the JSONBench 100-million-row Bluesky dataset, a typed path present in 4.2747% of rows produced these focused hot-cache results:

Query Sparse typed path Dense typed path Ordinary sparse column
sum(length(path)), 1 thread 74 ms 130 ms 72 ms
countIf(path != ''), 1 thread 78 ms 155 ms 74 ms
sum(length(path)), 16 threads 17 ms 24 ms 14 ms
countIf(path != ''), 16 threads 17 ms 25 ms 15 ms

This is an opt-in scan optimization. It can increase part-metadata size, insert CPU, and merge memory for schemas with many declared paths, so serialization_info_version = 'with_subcolumns' should be enabled only after all replicas understand the new part metadata.

Changelog category (leave one):

  • Performance Improvement

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

Typed paths in JSON columns can now use sparse serialization in MergeTree parts when serialization_info_version = 'with_subcolumns', reducing CPU and memory usage when scanning mostly absent paths.


Workflow [PR]
Sync PR [sync-upstream/pr/111429]

Version info

  • Merged into: 26.12.1.144-master (included in 26.12 and later)

rorylshanks and others added 8 commits July 22, 2026 00:45
Add recursive typed-path serialization metadata behind protocol revision 54489. Older peers retain the established dense materialization compatibility path.
Typed-path sparse metadata was introduced behind `serialization_info_version = with_subcolumns`. Mutation planning still used the older parent-column predicate, so it skipped metadata for `JSON`, whose outer column is not sparse even when typed paths are. It also treated any change to the typed-path set as an incompatible structure and replaced the old `SerializationInfoObject`, losing the serialization decisions of retained paths.

Centralize the insertion eligibility rule in `shouldCollectSerializationInfo` and use it from mutation planning. For `Object`-to-`Object` schema changes, preserve metadata through `createWithType`; that method maps retained paths, removes deleted paths, and initializes new paths without a second implementation of the mapping logic.

Add wide- and compact-part schema-evolution coverage, exercise dynamic and shared `JSON` data in the revised `Native` test, and verify protocol interchange between the built 26.7.1.1 server and 26.6.2.81. The integration test also covers an S3-backed mutation followed by a final merge. Document that `with_subcolumns` must wait until all replicas understand the new part metadata.

On the official 10-million-row JSONBench Bluesky slice, `commit.record.reply.parent.uri` is present in 4.76% of rows. Across 200 hot single-thread iterations, sparse typed-path scans reduced p50 from 17 ms to 10 ms for `countIf` and from 15 ms to 10 ms for `sum(length)`, while an ordinary sparse column took 9 ms. The profiled scan decompressed 4.30 MB instead of 80.0 MB and used 0.44 MB instead of 0.85 MB peak memory. The five official queries that do not read the sparse path remained within 4% at one thread.
Resolved conflict in `docs/reference/settings/merge-tree-settings.mdx`: `master`
removed the locally autogenerated settings block from that file, so the
regenerated block from this branch is dropped. The setting descriptions the
branch changed live in `src/Storages/MergeTree/MergeTreeSettings.cpp` and are
preserved.
Resolve the only conflicts, which are both from the documentation
reorganization on master: `docs/en/interfaces/specs/NativeFormat.md` and
`docs/en/interfaces/specs/NativeProtocol.md` were deleted and their content now
lives at `docs/reference/interfaces/specs/NativeFormat.mdx` and
`docs/reference/interfaces/specs/NativeProtocol.mdx`.

Take master's deletion of the old paths and port this branch's specification
changes to the new ones:
- recursive `kind_stack` now covers named subcolumns, not only `Tuple` elements;
- the `JSON` typed-path entries and their lexicographic ordering at revision
  `54489`;
- the `DBMS_MIN_REVISION_WITH_JSON_TYPED_PATHS_SERIALIZATION` row in the
  backward-compatibility table;
- sparse declared typed paths in the `JSON` FLATTENED section;
- the `JSON_TYPED_PATHS_SERIALIZATION` row in the protocol feature table.

`DBMS_TCP_PROTOCOL_VERSION` merged cleanly: master is still at `54488`, so this
branch keeps `54489`.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…-typed-paths

# Conflicts:
#	docs/reference/interfaces/specs/NativeProtocol.mdx
#	src/Core/ProtocolDefines.h
#	src/DataTypes/DataTypeObject.cpp
#	src/DataTypes/DataTypeTuple.cpp
#	src/DataTypes/DataTypeTuple.h
#	src/DataTypes/IDataType.h
#	src/DataTypes/Serializations/SerializationInfoTuple.cpp
#	src/Formats/NativeReader.cpp
#	src/Formats/NativeWriter.cpp
Preserve typed-path serialization metadata when a mutation rewrites a stale `JSON` column at its current storage type. Accept derived `SerializationObject` implementations and include the complete `IColumn` definition required by the merged code.
@george-larionov george-larionov added the can be tested Allows running workflows for external contributors label Aug 25, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [96eb61b]

Summary: ✅


AI Review

Summary

Reviewed #111429 at 96eb61b19a00254791525d1fd6f57bcf9781d6d4, including all prior discussion. The opt-in with_subcolumns metadata lets declared JSON paths choose sparse serialization independently while preserving the existing Native wire layout. No remaining blocker or major findings. The previous NativeWriterTypeCache finding is addressed by normalizing constant and compressed columns before choosing serialization.

The new column form was traced through these consumers:

  • Part readers, typed-path readers, and subobject readers create columns matching the selected nested serialization; combined-path reads use the specialized subobject column.
  • Row output reconstructs serialization from physical columns. Scalar functions, aggregation, sorting, joins, insert writers, and mutation pipelines materialize sparse children where dense columns are required.
  • Both NativeWriter branches expand constant and compressed columns and materialize typed paths; detached marshalling uses the same normalization through ColumnBLOB::toBLOB.
  • Schema evolution carries compatible named child metadata forward; part serialization caches include recursive kinds and serialization settings.

Focused runtime checks using the head's CI binary passed for whole-value output, subobjects, functions, aggregation, grouping, sorting, joins, wrapper conversions, copying, merging, and nested schema evolution. Metadata confirmed sparse paths before and after evolution. The head's Fast test passed; broader CI jobs were still pending or running when checked. The PR provides focused before/after scan measurements supporting its performance claim.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-performance Pull request with some performance improvements label Aug 25, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

📊 Cloud Performance Report

⚠️ AI verdict: not_sure — 2 query(s) improved out of 32 analysed

Release-transition baseline: compared against the most recent available 26.9 masters at or before the trusted base-commit anchor because no 26.10 master baseline exists there.

This PR adds sparse serialization for JSON typed paths, behind the opt-in serialization_info_version = 'with_subcolumns'. Plain-column tables like ClickBench hits and TPC-H are unaffected: the new hooks return false for non-JSON types. Every flagged result is an improvement, and none can plausibly come from this diff, so most were downgraded to not sure. ClickBench Q18 (-26.1%) and Q32 (-48.5%) are large enough that their verdicts are locked and could not be downgraded. All the improvements are more likely baseline drift, since the source build is v26.10 and the baseline is v26.9. Rerun against a baseline built from the PR's exact base commit before crediting this PR with any speedup.

clickbench

🟢 2 improved · ⚠️ 5 inconclusive

Flagged queries (7 of 43)
Query Verdict Baseline median (ms) PR median (ms) Change q-value Hint
🟢 18 improvement 1064 786 -26.1% <0.0001 aggregation: The -26.1% change is large enough that the verdict is locked, but this GROUP BY never reaches the JSON typed-path serialization code. Check it against a baseline built from the PR's exact base commit.
🟢 32 improvement 1342 691 -48.5% <0.0001 aggregation: The -48.5% change and the CPU drop are large enough that the verdict is locked, but the diff only affects JSON typed paths. Baseline drift between 26.9 and 26.10 is the more likely cause.
⚠️ 16 not_sure 616 497 -19.3% <0.0001 aggregation: This is a heavy GROUP BY over ClickBench's flat hits table, which has no JSON or Tuple columns, so the -19.3% change does not come from this diff.
⚠️ 28 not_sure 1061 1000 -5.7% <0.0001 aggregation: Borderline -5.7% change on noisy measurements. The query reads plain columns that the new serialization-info logic does not affect.
⚠️ 31 not_sure 308 257 -16.6% <0.0001 aggregation: This GROUP BY on plain columns does not reach the JSON or Tuple sparse-serialization code, so the -16.6% change is not attributable to this PR.
⚠️ 33 not_sure 1236 977 -21.0% <0.0001 aggregation: This high-cardinality GROUP BY on URL does not touch JSON typed paths or the new serialization-info version, so the -21.0% change is not from this diff.
⚠️ 34 not_sure 1244 976 -21.5% <0.0001 aggregation: This is the same shape as Q33 with the same -21.5% shift, and it runs no code this PR changes.

Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on.

tpch_adapted_1_official

⚠️ 4 inconclusive

Flagged queries (4 of 22)
Query Verdict Baseline median (ms) PR median (ms) Change q-value Hint
⚠️ 1 not_sure 66 53 -19.7% <0.0001 aggregation: Small -13 ms shift on a query with noisy history. TPC-H lineitem has no JSON columns, so this diff cannot account for it.
⚠️ 7 not_sure 82 61 -25.6% <0.0001 join_operator: Multi-join query with noisy history and only a -21 ms change. The diff does not touch join or scan paths for plain columns.
⚠️ 8 not_sure 90 76 -15.6% <0.0001 join_operator: This join-heavy query reads only primitive columns, so the -15.6% change does not come from the JSON serialization work.
⚠️ 17 not_sure 100 60 -40.0% <0.0001 join_operator: The baseline measurements were very noisy, and this correlated-subquery join does not run any changed code, so the -40.0% change is not attributable to this PR.

Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on.

Debug info
  • StressHouse run: 39bd3c36-6f18-4b90-b710-e019e4964189
  • MIRAI run: 7ffb7522-a895-4285-929c-ce70f3172492
  • PR check IDs:
    • clickbench_375717_1791471551
    • clickbench_375723_1791471551
    • clickbench_375745_1791471551
    • tpch_adapted_1_official_375759_1791471551
    • tpch_adapted_1_official_375774_1791471553
    • tpch_adapted_1_official_375789_1791471552

Avoid forwarding outer serialization info through typed-path wrappers, preserve matching nested serialization-info types during schema evolution, and cover the mutation-to-merge kind transition.
`LOGICAL_ERROR` terminates debug and sanitizer processes before the exception assertion can run. Follow the existing release-only pattern used by malformed serialization-info tests.
The invalid internal serialization state cannot be exercised through SQL, while debug and sanitizer builds terminate before an in-process exception assertion can run. Keep the fail-fast guard without a permanently skipped gtest.
@clickhouse-gh

clickhouse-gh Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Commit 96eb61b19a00254791525d1fd6f57bcf9781d6d4 was not compared: the CI logs cluster did not answer (the endpoint never became ready: the readiness probe timed out: HTTPSConnectionPool(host='t6h0zvqlg…).

See the job log for details.

rorylshanks and others added 2 commits October 8, 2026 10:59
…-typed-paths

Resolve conflicts with the switch from `forEachChild` to indexed children and
`doCloneWithChildren` in `DataTypeObject`. Build the per-path serialization
infos from master's `sorted_typed_paths` instead of sorting the paths again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rt_type`

The test was switched to `Nullable(JSON)` to cover reusing serialization info
through `Nullable`. That support was removed when the PR was trimmed back to
typed paths of `JSON` columns: typed paths of `JSON` nested in `Nullable` stay
dense, so the part never had `x` sparse and the expected `Sparse` could not
hold. Go back to the plain `JSON` column, which covers what the test is about:
keeping typed-path serialization info when a full-part mutation rewrites a
`JSON` column whose type in the part is stale.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@maxknv maxknv added the external Author is not a member of the ClickHouse organization label Nov 2, 2026
…-typed-paths

Conflicts:
- `src/DataTypes/DataTypeObject.cpp`: master moved `CANNOT_COMPILE_REGEXP` within the error code list; kept master's declaration and dropped the duplicate.
- `src/DataTypes/Serializations/SerializationObject.cpp`: kept the PR's `SerializationInfoObject.h` and `SerializationObjectTypedPath.h` includes next to master's include list.
- `src/Formats/NativeWriter.cpp`: kept master's new `setAggregateFunctionStateVersions`, and used master's `removeSpecialRepresentations` on the PR's materialized `result_column` for old clients.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01E5v7QTSR65LdYnQEv9HJVu
@mintlify

mintlify Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 96eb61b.

Approve preview

rorylshanks and others added 3 commits November 4, 2026 00:50
`DataTypeObject::createColumn` taking a serialization looked up every
typed path of a sub-object type in the typed path serializations of
`SerializationSubObject`. Since master added `SHARED` typed paths, the
`SHARED` ones are not there: they are read together by the typed shared
data serialization. Reading `j.^a` of `JSON(SHARED a JSON, SHARED a.b Int64)`
threw `std::out_of_range` (`05292_json_shared_typed_paths_resolution`).

Master now creates the column layout a serialization deserializes into
through `ISerialization::wrapColumnForDeserialization`, so drop the
override and let `SerializationSubObject` wrap the columns of the typed
paths it reads itself, like `SerializationObject` does.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=111429&sha=f5e10da0423243d5c6662602baaacc1087dab320&name_0=PR&name_1=Fast%20test
PR: ClickHouse#111429

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01E5v7QTSR65LdYnQEv9HJVu
A `SHARED` typed path is stored in the typed shared data of a part. The
serialization info of the `JSON` column chose `Sparse` for it like for
any other typed path, but `SerializationObjectTypedSharedData` decodes a
path read as a subcolumn into a column of the default layout, so reading
such a path with `Sparse` serialization fails on `assert_cast` to
`ColumnSparse`.

Do not choose a kind for the serialization info of a `SHARED` path, and
do not carry the kind of a path over when it becomes `SHARED` in
`SerializationInfoObject::createWithType`. The other typed paths still
become `Sparse`, including the ones next to a `SHARED` path in a
sub-object, which the new test covers too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01E5v7QTSR65LdYnQEv9HJVu
`SerializationObject::wrapColumnForDeserialization` and
`SerializationSubObject::wrapColumnForDeserialization` replace the typed
path columns through `ColumnObject::getTypedPaths`, but `ColumnObject`
keeps raw pointers to them in `sorted_typed_path_columns`. The pointers
were left dangling, and filling defaults of the typed paths while parsing
`JSON` dereferenced them (segmentation fault in
`05022_json_max_dynamic_subcolumns_in_parsing_after_default_rows`).

This became reachable when the `DataTypeObject::createColumn` override
taking a serialization was removed, because columns of `JSON` are now
always created through `wrapColumnForDeserialization`. Make
`ColumnObject::rebuildSortedTypedPathColumns` public and call it after
the typed path columns are replaced.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=111429&sha=446f3b5a240509a6585fa01b230a1e7348ac7bce&name_0=PR&name_1=Fast%20test
PR: ClickHouse#111429

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01E5v7QTSR65LdYnQEv9HJVu
@alexey-milovidov alexey-milovidov self-assigned this Nov 16, 2026
…yped-paths

Conflict resolutions:
- `SerializationInfoTuple`: kept the PR's move of the shared logic into
  `SerializationInfoNamed`; ported master's exclusion of `Replicated`
  (besides `Detached`) for element kinds into
  `SerializationInfoNamed::deserializeFromKindsBinary`, and added master's
  `[[nodiscard]]` annotations to the moved/new declarations.
- `NativeWriter`: kept materializing `JSON` typed paths and used master's
  `getSerializationInfoSettings`; also materialize them on master's new
  cached-type path, so the `Native` wire layout stays unchanged there too.
- `SerializationObject` / `SerializationSubObject`: ported the PR's
  `wrapColumnForDeserialization` overrides to master's
  `createColumnForDeserialization(const IDataType &)`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Merged current master (conflicts in SerializationInfoTuple, SerializationObject, NativeWriter; the wrapColumnForDeserialization overrides were ported to master's createColumnForDeserialization, and JSON typed paths are now also materialized on the new cached-type path of NativeWriter). All tests added by this PR pass locally.

The previous Upgrade check failure (TTL Division by zero in the 05073 fixture) is fixed on master by #127731, which is now merged in.

@groeneai, investigate the failure: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=111429&sha=49113872814712fd28366ef8ed3fe841ea6de7ea&name_0=PR&name_1=La%20Casa%20Del%20Dolor%20%28amd_debug%29 (Logical error: CreationTID of part all_1_1_0 ... is set to unexpected value (1, 1, 00000000-0000-0000-0000-000000000000, 0) with a running read-only transaction; it is in the transactions code and unrelated to sparse JSON typed paths) and provide a fix in a separate PR. If the fix is already in progress, link it here.

@groeneai

Copy link
Copy Markdown
Collaborator

This is already fixed by #128898 (merged 2026-11-05), and this PR's tree includes it since your master merge.

It is the same STID 4605-4c8e and stack (MergeTreeSink::commitUniqueKeyPart -> UniqueKeyTxnCommit::InsertCommit::publish -> MergeTreeTransaction::addNewPartAndRemoveCovered): an insert into a UNIQUE KEY table always runs under its own internal transaction, but if a disk of the table does not support writing with append (e.g. plain_rewritable metadata), supportsTransactions() is false and the writer stamps the part with NonTransactionalTID. The "readonly" transaction in the message is that internal one, checked before its first part is added. #128898 rejects UNIQUE KEY on such storage at CREATE, INSERT and ALTER.

The linked run is head 4911387 (2026-11-04 12:36 UTC), before the fix merged. CIDB has 5 rows of this signature, all between 2026-11-03 and 2026-11-04 15:58 UTC, and none on master or any PR since.

Comment thread src/Formats/NativeWriter.cpp Resolved
alexey-milovidov and others added 3 commits November 21, 2026 17:19
`modernize-use-nodiscard` failed the `arm_tidy` builds on
`SerializationInfoSettings::shouldCollectSerializationInfo`.

Also cast the result of `getTypedPathInfo` to `void` inside `EXPECT_THROW` in
`gtest_serialization_info.cpp`: the getter is `[[nodiscard]]`, so the unit
tests did not compile with `-Werror,-Wunused-result`.

https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=111429&sha=838799ec1d1ea021c30c5fb16212df49488d647f&name_0=PR&name_1=Build%20(arm_tidy%2C%204%2F4)
ClickHouse#111429

Co-Authored-By: Claude Fable 5.2 <[email protected]>
…h `NativeWriterTypeCache`

The cached-type branch of `NativeWriter::write` called
`materializeObjectTypedPaths` on the column as is, while
`getSerializationAndColumn` first applies `convertToFullColumnIfConst` and
`decompress`. A compressed `JSON` column reached the `assert_cast` to
`ColumnObject` in `DataTypeObject::getSerializationInfo`, and a constant one
kept its typed paths sparse, so the written kinds did not match the data
that `writeData` emits (`Bad cast from type ColumnSparse to ColumnVector`
exception).

Make the column full before materializing typed paths, as on the path
without the cache, and add a unit test that writes sparse, compressed and
constant `JSON` blocks with and without the type cache.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

🕵 Merged current master (no conflicts) and pushed two fixes:

  • 936c346: the arm_tidy builds failed on modernize-use-nodiscard for SerializationInfoSettings::shouldCollectSerializationInfo; it is now [[nodiscard]]. gtest_serialization_info.cpp also did not compile because of a discarded [[nodiscard]] result inside EXPECT_THROW.
  • 96eb61b: addressed the review thread about the NativeWriterTypeCache path in NativeWriter for compressed and constant JSON columns, with a regression unit test.

@groeneai, thanks - the CreationTID failure is confirmed as fixed by #128898, which this branch already includes.

@stresshouse

stresshouse Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

📊 Cloud Performance Report

✅ AI verdict: no_change — no significant changes across 29 queries analysed

no significant changes detected. K_source=4 K_base=26 flagged=0/65

clickbench

🟢 No significant changes

tpch_adapted_1_official

🟢 No significant changes

Debug info
  • StressHouse run: 71657336-8f13-46e6-aa53-fad3a9237677
  • MIRAI run: 42d726cf-ad9a-4e81-ac68-40b59fd8dafc
  • PR check IDs:
    • clickbench_733575_1795312255
    • clickbench_733581_1795312255
    • tpch_adapted_1_official_733608_1795312255
    • tpch_adapted_1_official_733642_1795312255

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Nov 22, 2026
Merged via the queue into ClickHouse:master with commit b6f0aca Nov 22, 2026
196 checks passed
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 22, 2026
subkanthi pushed a commit to subkanthi/ClickHouse that referenced this pull request Nov 22, 2026
…parse-json-typed-paths"

This reverts commit b6f0aca, reversing
changes made to 711cfda.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
clickhouse-gh Bot pushed a commit that referenced this pull request Nov 23, 2026
Edited by the nightly changelog CI job following .claude/skills/edit-changelog/SKILL.md.

Changelog-revert: 133486 111429 Revert "Enable sparse serialization independently for typed paths declared inside `JSON` columns."
Changelog-deleted-entry: 111429 [Performance Improvement] [section] * Typed paths in `JSON` columns can now use sparse serialization in `MergeTree` parts when `serialization_info_version = 'with_subcolumns'`, reducing CPU and memory usage when scanning mostly absent paths. [#111429](#111429) ([Rory Shanks](https://github.com/rorylshanks)).
alexey-milovidov added a commit that referenced this pull request Nov 25, 2026
…y-serialization

Conflict resolution:

- `master` reverted the sparse serialization of `JSON` typed paths
  (#133486 reverting
  #111429), which removed
  `SerializationInfoNamed` and `SerializationInfoObject`. The `checkKindStacks`
  and `checkKindStackForType` overrides move back to `SerializationInfoTuple`,
  the ones of `SerializationInfoObject` are dropped together with the class,
  and `MutateTask` uses `canUseSparseSerialization` again instead of the
  removed `shouldCollectSerializationInfo`.
- `NativeWriter::getSerializationAndColumn`: keep the materialization of
  non-native `LowCardinality` columns for old peers on top of the reverted code.
- `tryGetSerializationHints` now takes the metadata snapshot
  (#133300): pass it through
  in the overrides this branch adds for the wrapper storages.
- `tests/parallel_replicas_plan_based_blacklist.txt`: `master` removed the whole
  `UNIQUE KEY` section, because plan-based parallel replicas now keep such reads
  local (#133744), so
  `05449_auto_low_cardinality_serialization_unique_key` is not listed anymore.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-json-datatype JSON/Dynamic/Object datatype: semi-structured column storage, typed and dynamic paths, sub-object... external Author is not a member of the ClickHouse organization pr-performance Pull request with some performance 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.

6 participants