Skip to content

Add SHARED typed paths to the JSON type - #127000

Merged
Avogar merged 17 commits into
masterfrom
shared-type-hints-plain
Oct 26, 2026
Merged

Avogar merged 17 commits into
masterfrom
shared-type-hints-plain

Conversation

@Avogar

@Avogar Avogar commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Closes: #117526

Motivation

Every typed path of a JSON column is stored in a MergeTree part as a separate column, with its own set of files. A column with hundreds of typed paths produces thousands of files per part, and on object storage every file is a request, so whole-column reads, merges and metadata operations pay per path.

Solution

The JSON type gets a SHARED modifier for typed paths: JSON(SHARED a UInt32, SHARED b String, c String). A SHARED path behaves like any typed path: same type, same json.a sub-column syntax, same sub-object and combined sub-column reads, same ALTER, and system.parts_columns lists it like the others. The difference is on disk: all SHARED paths of a column are stored together in the typed shared data of the part, in a constant set of files however many paths there are, instead of a set of files per path.

The data is written granule by granule, path by path, and a marks file records where each path's data starts in every granule. Reading some paths therefore decodes only those paths, while a whole-column read goes through the file sequentially. Readers of several paths of one column share the decoding work through the substreams cache. The header records the bytes of every path, so the sizes of SHARED paths, which the PREWHERE optimization uses to order conditions, stay known.

ALTER TABLE ... MODIFY COLUMN adds or removes the modifier, as a metadata-only change with lazy type hints or as a mutation otherwise, and parts of both layouts are read together. The on-disk format is versioned by the new MergeTree setting object_typed_shared_data_serialization_version. Outside MergeTree parts, in Memory tables or the Native format, SHARED paths are serialized like other typed paths.

Sub-column resolution of JSON now prefers a typed path over a same-named sub-column of another typed path: with JSON(a Tuple(b String), a.b Int64), json.a.b is the typed path a.b of type Int64, where it used to be the Tuple element b of a. A declared path is the intended reading of its name. MergeTree rejects such types because their stream names collide, so the change is visible only in other engines and in CAST.

Tests

Stateless tests cover the type and its resolution, sub-columns and nested types, key ranges, merges and mutations, ALTER, Compact and Wide parts, S3 request patterns, replication and backups, a thousand paths, and the caches. A performance test compares reads against plain typed paths. The JSON documentation describes the modifier.

Changelog category (leave one):

  • New Feature

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

Added the SHARED modifier for typed paths of the JSON type, for example JSON(SHARED a UInt32, SHARED b String). In MergeTree parts such paths are stored together in a constant set of files instead of a set of files per path, which keeps the number of files and object storage requests per part small for columns with many typed paths, while a read of a path still decodes only that path. The on-disk format is controlled by the new MergeTree setting object_typed_shared_data_serialization_version. Sub-column resolution of JSON now prefers a typed path over a same-named sub-column of another typed path, for example json.a.b of JSON(a Tuple(b String), a.b Int64) is now the typed path a.b; MergeTree rejects such types, so only other engines and CAST see the change.


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

Version info

  • Merged into: 26.11.1.786-master (included in 26.11 and later)
  • Backported to: 26.10.3.11

Avogar and others added 4 commits October 19, 2026 14:53
The subcolumn readers of one column share the deserialize states of
their common streams (`Variant` discriminators, the structure of the
`JSON` dynamic shared data, sparse offsets): the first reader in a call
decodes such a stream and the others take it from the substreams cache
without advancing their state. `DeserializationPrefixesCache` cloned
every top-level state separately, so each reader got its own copy of a
shared state, and `LowCardinality` never put its state into the states
cache at all. When the columns cache serves a subcolumn for some
granules and not for others, the decoding reader changes between calls
and continues from a stale position: wrong values of `JSON` and
`Variant` subcolumns, exceptions for `Dynamic` and `LowCardinality`.

`DeserializeBinaryBulkState::clone` now memoizes the clones in a context
shared by the whole prefixes map and calls the virtual `cloneImpl`, so a
state shared before cloning stays shared after it. `LowCardinality`
adds its state to the states cache in `deserializeBinaryBulkStatePrefix`.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The JSON type accepts `SHARED path Type` arguments: the parser, the
AST, the binary type encoding and its docs, the least supertype and
the identity conversion between types that differ only in SHARED
marks. A SHARED path resolves as a dynamic subcolumn of the type, and
the subcolumn enumeration lists it with the static ones. The Object
and sub-object serializations dispatch the SHARED paths to the typed
shared data serialization inside data parts and serialize them like
any typed path elsewhere.

The typed shared data of a JSON column stores its SHARED paths in three
streams of a part: a header with the serialization version and, in Wide
parts, the bytes of every path; the paths' data granule by granule, each
path's granule serialized as one unit with a fresh state, blocks cut by
the compressor's size rule and once after the granule's last path; and
a marks entry per granule with the row count and the start of every
path's data, in Wide parts also the end of the block holding its last
byte, from the compressor's block-written callback. The Wide writer
signals the completion of a granule to the serialization, also for a
granule completed without a call carrying its rows, and routes the
block-written callback to the stream's compressor.

The readers of the SHARED paths of one column share the structure state
created with the header. Every reader's prefix registers the paths it
reads; the first reader of a call to miss the substreams cache decodes
every requested path of the call's granules, seeking to their marks,
and caches the columns under the paths' identity elements; the others
copy their rows from the cache. A subcolumn of a path is extracted from
the decoded path. The sub-object over SHARED paths is a container
delegating to one path reader per path. The whole column decodes every
granule in order. The Wide reader reports the streams of a column with
the size hints of a shared file, so that a SHARED path's size is its
share of the typed shared data. Dropping a column removes the files
listed in columns_substreams.txt.

In the serialization interface: the substream types of the typed
shared data, the identity element of a SHARED path rendered in
subcolumn names and cache keys but not in file names, the prefetch
predicate that excludes a reader of some SHARED paths, the size hint
of a shared stream, the granule completion flag, the block-written
callback and the serialization version in the serialize settings.
The version is the MergeTree setting
`object_typed_shared_data_serialization_version` with the single
value `v1`.

Stateless tests of the type, its resolution and subcolumns, nested
types, key ranges and cut calls, merges and mutations including a
granule closed without rows under adaptive granularity, ALTER, the
part's files and the wire, S3 with the request pattern of path and
whole-column reads, replication and backups, scale, the uncompressed
cache, concurrent readers and the columns cache, plus a performance
test. The JSON type documentation describes the `SHARED` modifier.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
# Conflicts:
#	src/DataTypes/Serializations/SerializationObject.cpp
#	src/DataTypes/Serializations/SerializationSubObject.cpp
#	src/Storages/MergeTree/MergeTreeReaderWide.cpp
#	tests/queries/0_stateless/05401_columns_cache_shared_deserialize_states.sql
The history record of object_typed_shared_data_serialization_version
moves to 26.11, the version master is at. system.parts_columns loses
its special case for SHARED paths: the general code lists them with
their type's sub-columns like other typed paths, with no sizes since
they have no files of their own; the references of 05291 and 05302
follow.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@mintlify

mintlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
ClickHouse-docs 🟢 Ready View Preview Oct 20, 2026, 6:06 PM

…-plain

# Conflicts:
#	src/Compression/CompressedWriteBuffer.cpp
@clickhouse-gh

clickhouse-gh Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [a607056]

Summary: ✅


AI Review

Summary

PR #127000 adds SHARED typed paths to JSON, packing their data into shared part streams while preserving typed-path access and supporting layout changes through ALTER TABLE. Reviewed head a60705676c177f679f4979a4a852bdd0a5c17e51, the current implementation, and all prior discussion. Two existing concerns remain below; no new inline findings were identified.

Findings

❌ Blockers

  • src/DataTypes/Serializations/SerializationObject.cpp:494: The new persistent layout has no experimental opt-in. [dismissed by author -- https://github.com/Add SHARED typed paths to the JSON type #127000#discussion_r4329097057] The author expects immediate adoption. The concern remains because this introduces a new persistent codec with granule buffering, marks, and coordinated reader state, while object_typed_shared_data_serialization_version accepts only v1 and cannot prevent adoption. Gate new SHARED definitions, including nested definitions and alterations, behind an experimental setting while retaining access to existing parts.

  • src/DataTypes/DataTypeObject.cpp:697: Exact typed paths are interpreted as dynamic type hints before lookup. The existing inline finding remains reproducible on this head's binary:

    SELECT getSubcolumn(
        CAST('{"a":{":`Int64`":"hello"}}', 'JSON("a.:`Int64`" String)'),
        'a.:`Int64`');

    This returns NULL of type Nullable(Int64) instead of hello of type String. The SHARED declaration fails identically. This also affects existing types without SHARED. Resolve an exact full-name typed path before interpreting hint syntax, and add regression coverage for both declarations.

Final Verdict

❌ Block. Resolve exact typed paths before parsing hints and provide experimental control over adoption of the new persistent layout. The latter concern was dismissed by the author and is retained here without another thread reply.

@clickhouse-gh clickhouse-gh Bot added pr-feature Pull request with new product feature comp-json-datatype JSON/Dynamic/Object datatype: semi-structured column storage, typed and dynamic paths, sub-object... labels Oct 20, 2026
Avogar and others added 2 commits October 20, 2026 18:28
readMarkDelta initializes its locals, which clang-tidy requires. Test
05291 no longer calls JSONMergePatch, which the fast test build lacks
(RapidJSON is not built there); JSONExtract functions show the same
thing, that a SHARED JSON value feeds the ordinary JSON functions.

CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=127000&sha=25372333ba5ac91914adca88ea82e7f5a785744a&name_0=PR
PR: #127000

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The previous commit staged the stale local checkouts of contrib/h3 and contrib/zmij by mistake.

PR: #127000

Co-Authored-By: Claude Fable 5.1 <[email protected]>

for (const auto & path : sorted_typed_paths)
/// Only data parts have the marks and callbacks the typed shared data needs; the Native-only versions returned above.
object_state->use_typed_shared_data = typed_shared_data_serialization && settings.data_part_type != MergeTreeDataPartType::Unknown;

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.

[P1] Gate the new persistent layout behind an experimental setting

This enables the new on-disk codec for every JSON(SHARED ...) column without any experimental setting. object_typed_shared_data_serialization_version only accepts v1, so it cannot control adoption of the new format. Unlike exposing an existing serialization through new syntax, this introduces new granule buffering, marks, and shared reader state that permanently determine how parts are stored. New on-disk formats need an explicit experimental opt-in so deployments can prevent their adoption until they are proven safe.

Please gate creation and alteration of new SHARED definitions behind an experimental setting, including nested definitions, and enable it explicitly in the tests. Reading already persisted parts should remain possible independently of that creation gate.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I am not convinced that this should be experimental. The feature is straightforward and I expect it to be used right away

@clickhouse-gh

clickhouse-gh Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing a60705676 with master 6a363630e (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Object file sizes

880 object files changed (+781.07 KiB total), 3 added.

Object file Master PR Δ
src/CMakeFiles/dbms.dir/DataTypes/Serializations/SerializationObjectTypedSharedData.cpp.o new 255.63 KiB +255.63 KiB
src/CMakeFiles/dbms.dir/DataTypes/Serializations/SerializationObjectTypedSharedDataPath.cpp.o new 119.19 KiB +119.19 KiB
src/CMakeFiles/dbms.dir/DataTypes/Serializations/SerializationSubObjectTypedSharedData.cpp.o new 112.79 KiB +112.79 KiB
src/CMakeFiles/dbms.dir/DataTypes/DataTypeObject.cpp.o 664.48 KiB 708.40 KiB +43.92 KiB (+6.61%)
src/CMakeFiles/dbms.dir/Core/SettingsEnums.cpp.o 2.21 MiB 2.23 MiB +23.56 KiB (+1.04%)
src/Storages/System/CMakeFiles/clickhouse_storages_system.dir/StorageSystemPartsColumns.cpp.o 456.47 KiB 474.17 KiB +17.70 KiB (+3.88%)
src/CMakeFiles/dbms.dir/DataTypes/Serializations/SerializationObjectHelpers.cpp.o 190.37 KiB 206.73 KiB +16.36 KiB (+8.59%)

719 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.

Compile time of recompiled translation units

3562 translation units recompiled, 18449 s compile time in total, 3558 of them have a recent master baseline.

Translation units without a recent master baseline:

  • programs/keeper/Keeper.cpp (clickhouse-keeper): 7.9 s

Job report

@antonio2368 antonio2368 self-assigned this Oct 21, 2026
Comment thread src/DataTypes/DataTypeObject.cpp Resolved
Comment thread src/DataTypes/DataTypeObject.cpp Resolved
Comment thread src/DataTypes/DataTypeObject.cpp Resolved
Comment thread src/DataTypes/DataTypeObject.h Resolved
Comment thread src/DataTypes/IDataType.h Resolved
Comment thread src/Parsers/ParserDataType.cpp Resolved
Avogar and others added 2 commits October 21, 2026 14:13
… tests

A typed path wins over the other readings of its name: the lookup
resolves typed paths before the special subcolumn of the distinct
paths and the sub-object and combined prefixes, so a path named like
one of them is found. A subcolumn of another typed path with the same
name stays behind the typed path, which the unit tests now state. The
special case for a name that begins with a type hint is gone: typed
paths are no longer matched by the stream walk, so no caller hands a
hint without its path to the object, and such a name is a dynamic
path like any other.

The flaky check runs each changed test repeatedly under the thread
fuzzer and fails runs over 180 seconds unless the test is long: the
seven tests that took over 120 seconds there carry the tag. 05305 and
05303 send each section's comparisons in one client call and use
smaller tables. 05298 prints only the final granule count of the query
with two skip indexes, whose order of application is not fixed. 05292
checks the collision of a SHARED path with a subcolumn of another.

CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=127000&sha=d3f0c36a6c05f6fd50b66115804cb6665475b777&name_0=PR
PR: #127000

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The subcolumn lookup of JSON rejects a name that is only a type hint:
the hint parser recognizes a hint at the start of the name as one with
an empty path, and a hint without a path denotes nothing. This keeps
the behavior that the crash regression test 04545 pins, in place of the
removed fall-through check.

05303 asserts only that the warm reads used the filesystem cache: the
flaky check runs several copies of the test against one cache, and an
eviction between the cold and the warm run made the first warm query
read from the source again.

CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=127000&sha=5b36629a316ccefc265af88b2c4e96d03e1ef07c&name_0=PR
PR: #127000

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Avogar and others added 5 commits October 22, 2026 13:14
…e new server only

Two checks of 05301 took a row with any(), whose choice follows the
read order, which parallel replicas change; argMin by the key picks
the same row everywhere.

The performance comparison runs the setup of every test on the
reference server too, which does not parse SHARED; the create query of
the SHARED table carries do_not_check_in_pr, so that in this pull
request the test runs on the new server only, and on both once merged.

CI: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=127000&sha=2b7a61272065bc6fa8b0977551eab7098dc7da60&name_0=PR
PR: #127000

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The clone of a JSON type keeps its SHARED set (gtest
CloneWithChildrenKeepsSharedPaths). The typed paths live in
DataTypeObject::TypedPathsMap, an unordered_map with a heterogeneous
hasher, so the prefix loop of the sub-column resolution looks a
string_view up without a copy, and the loop keeps its resolution of
the remainder instead of resolving it a second time. The JSON argument
parser never parses a type twice from the same position, which cost
2^depth on a malformed nested type (test 05428). Comment fixes in
IDataType.h.

#127000

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Cache keys: in the cache-key rendering a JSON path name follows the
keyword .object_paths and the identity element of a SHARED path renders
as .shared_paths.<name>, so a path named like a stream cannot collide
with it (test 05427). The sub-object reader decodes its SHARED paths in
one call straight into its columns, without path readers. The granule
writer builds the combined column of a path when the writer asks for
it. The stored ends of the marks entry are removed together with the
block-written callback of CompressedWriteBuffer: the reader never used
them. The prefetch of the typed shared data follows the dynamic shared
data's rule under merge_tree_prefetch_json_shared_data_substreams, and
the header stream is a metadata stream. Comment fixes.

#127000

Co-Authored-By: Claude Fable 5.1 <[email protected]>
system.parts_columns takes every sub-column's size from
IMergeTreeDataPart::getSubcolumnSize, which the readers use, instead
of looking the sub-column's file up: a sub-column stored in a shared
file, such as a SHARED path of JSON, has no file of its own (test
05302). The reader's substreams map is keyed by the requested column
names, which fixes the size of the size0 sub-column of a Nested
column: the reader reads it as the offsets of the collected Nested
column, under another name, and the lookup by the requested name found
nothing. getListOfStreamsForColumns is folded back into
getListOfStreamsForColumn.

#127000

Co-Authored-By: Claude Fable 5.1 <[email protected]>
05303: the flag helper compared nothing, so the request checks were
vacuous; they are real now, with corrected expectations: path a for
the seek checks, x > 52 for one granule, one read task per part, plain
file names and no columns cache against the randomizer, and a check of
the read-through between adjacent granules of a path with small
neighbours. 05301: argMin instead of any, which picked another row
under parallel replicas. 05304: no count of mutations, which
SharedMergeTree records for a lazy-hint ALTER. 05402: the long tag for
the flaky check.

#127000

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@Avogar
Avogar requested a review from antonio2368 October 22, 2026 18:23
Avogar and others added 2 commits October 23, 2026 13:41
The typed shared data reader chose its positioned read mode whenever
an absolute seek callback was set. The dynamic shared data sets that
callback for a whole-path read too, while it hands the value's
serialization one sequential buffer and no current-mark callback, so a
JSON(SHARED ...) value stored in a Dynamic path was read with the
value bytes taken for the granule entry and failed with INCORRECT_DATA
after a merge with the advanced serialization. The mode is now selected
by the current-mark callback, the one that means the substreams can be
positioned, as the dynamic shared data itself does for its streams.

Test 05429 covers the advanced and advanced_chunked shared data, Wide
and Compact parts, before and after the merge.

#127000

Co-Authored-By: Claude Fable 5.1 <[email protected]>
system.parts_columns asked the part for every sub-column's size one by
one, and each miss of the per-part cache built a reader and read the
typed shared data header, once per SHARED path. The part now takes the
list of a column's sub-columns and lists their streams with one reader
(IMergeTreeDataPart::getSubcolumnSizes, MergeTreeDataPartWide's
getListOfStreamsForColumns), so the header is read once per column:
a part with 600 SHARED paths costs one file open per query instead of
1200. The results still feed the per-part cache.

Also std::ranges::fill for a zero-row entry and the marks entry
described without the ends, from the review.

#127000

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@Avogar
Avogar requested a review from antonio2368 October 23, 2026 13:43
prefix, typed_paths, typed_paths_serializations, schema_format, paths_to_skip, path_regexps_to_skip,
max_dynamic_paths, max_dynamic_types, getDynamicType(), dynamic_path_serialization);
/// Split requested subcolumn to the JSON path, type hint, and remaining subcolumn.
auto split = splitPathAndDynamicTypeSubcolumn(subcolumn_name, getTypeOfNestedObjects()->getName());

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.

[P2] Resolve exact typed paths before interpreting type-hint syntax

This splits the requested name before checking whether the full name is a declared typed path. Quoted path names containing .: followed by a backquoted type are therefore reinterpreted as dynamic type hints, including on existing types without SHARED.

Reproduced with this PR head's Fast test binary:

SELECT getSubcolumn(
    CAST('{"a":{":`Int64`":"hello"}}', 'JSON("a.:`Int64`" String)'),
    'a.:`Int64`');

The result is NULL of type Nullable(Int64), although the declared path is a String containing hello. The same happens with JSON(SHARED "a.:`Int64`" String). Previously, the exact typed-path stream matched the full name before dynamic resolution. Here the split produces path a and hint Int64, so the lookup misses the declared path and reads an absent dynamic path instead.

Please resolve an exact full-name entry in typed_paths before parsing hint syntax, and add a regression covering both ordinary and SHARED paths.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I will make a follow-up fix for that

The flaky check of the private CI, on S3 storage with the metadata in
Keeper and the engine replacer, runs the replication test past the
180-second limit.

#127000

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@Avogar
Avogar added this pull request to the merge queue Oct 26, 2026
Merged via the queue into master with commit b7b3d89 Oct 26, 2026
179 checks passed
@Avogar
Avogar deleted the shared-type-hints-plain branch October 26, 2026 11:27
@robot-ch-test-poll3 robot-ch-test-poll3 added pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo labels Oct 26, 2026
@robot-ch-test-poll robot-ch-test-poll added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Oct 26, 2026
Avogar added a commit that referenced this pull request Oct 27, 2026
Backport #127000 to 26.10: Add `SHARED` typed paths to the JSON type
groeneai added a commit to groeneai/ClickHouse that referenced this pull request Oct 28, 2026
…previous-commands

Resolve the conflict in collectFilesForRenames with ClickHouse#127000: the
once-per-column guard of remove_column_streams stays in front of the new
remove_stream lambda that reads columns_substreams.txt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
alexey-milovidov pushed a commit to ylw510/ClickHouse that referenced this pull request Oct 28, 2026
Under MSan the test runs at 80-90% of the 600 s per-test timeout (master
amd_msan: median 470 s, max 532 s over 6 passing runs, one Timeout! at
600.25 s), against 16 s in amd_debug. The failing job's query_log: six
single-threaded INSERTs parsing 640 000 JSON documents 246 s, 18 comparison
queries over both tables ~300 s, OPTIMIZE FINAL 22 s; the SHARED table and
its plain twin cost the same, and the time does not depend on the random
settings draw. The body and reference are unchanged, so ASan, UBSan, TSan
and the other builds keep running it.

Failing job: https://github.com/ClickHouse/ClickHouse/actions/runs/40338606213/job/121633043306

Related: ClickHouse#127000
Related: ClickHouse#115050

Co-Authored-By: Claude Opus 5.5 <[email protected]>
valerypetrov added a commit to valerypetrov/clickhouse-sql-syntax that referenced this pull request Oct 29, 2026
On the committed corpus check() now accepts all 20132 valid statements,
rejects 4731 of 4868 invalid ones, and reports every one of the 4638
errors it shares with ClickHouse at ClickHouse's position with its
message. The thresholds sit just under these rates, so losing a single
statement fails the test; messageMatch is new.

The 137 invalid statements that check() accepts are not parser bugs:
124 use SHARED paths in JSON types, which the source accepts and a
master build from after ClickHouse/ClickHouse#127000 (1230fe66203) accepts too, and 13 are
SYSTEM INSTRUMENT ADD, which a build without XRay does not parse.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
huldarchen pushed a commit to huldarchen/ClickHouse that referenced this pull request Nov 2, 2026
Under MSan the test takes up to 445 s of the 600 s per-test timeout on
master (amd_msan: median 235 s over 37 passing runs in 30 days), against
7 s in amd_debug, and it times out in the private CI's MSan jobs on object
storage. Smaller tables do not fit it: on one MSan server half the rows
took 0.85x the time and a quarter 0.74x, because most of the cost is per
query, not per row. The body and reference are unchanged, so ASan, UBSan,
TSan and the other builds keep running it, and under MSan the many-task
SHARED read path stays covered by 05303_json_shared_typed_paths_s3.

445 s run: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?REF=master&sha=2fbf0f458e338daafbd720d14069681c51b557a8&name_0=MasterCI&name_1=Stateless%20tests%20%28amd_msan%2C%20parallel%2C%202%2F3%29

Related: ClickHouse#127000
Related: ClickHouse#127865

Co-Authored-By: Claude Opus 5.5 <[email protected]>
huldarchen pushed a commit to huldarchen/ClickHouse that referenced this pull request Nov 3, 2026
…tream-names"

This reverts commit 46a479e, reversing
changes made to 1e6f88e.

The conflicts with the later changes of ClickHouse#127000 to the same code (the
cache-key rendering of the SHARED paths of JSON and the sub-column sizes
in getAllColumnsSubstreams) are resolved by keeping their behaviour over
the pre-ClickHouse#124816 mechanics: stream names built per call and string keys
of the substreams caches.

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

Labels

comp-json-datatype JSON/Dynamic/Object datatype: semi-structured column storage, typed and dynamic paths, sub-object... pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-feature Pull request with new product feature pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v26.10-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Store some typed paths in JSON in a shared structure instead of separate subcolumns

4 participants