Skip to content

Bump simdjson from v4.6.11 to v5.0.8 - #124651

Merged
Algunenano merged 5 commits into
ClickHouse:masterfrom
actueleai:bump-simdjson-v5.0.3
Nov 18, 2026
Merged

Algunenano merged 5 commits into
ClickHouse:masterfrom
actueleai:bump-simdjson-v5.0.3

Conversation

@actueleai

@actueleai actueleai commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Bump simdjson from v4.6.11 to v5.0.8.

Fork

Carries 2 ClickHouse patches (ClickHouse/simdjson#11): SIMDJSON_UTF8VALIDATION in the scalar string scanner, and restricting the SSE2 key-selector path to real x86 (fixes Build (ppc64le)).

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

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

Update simdjson from v4.6.11 to v5.0.8.


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

Version info

  • Merged into: 26.11.1.2756-master (included in 26.11 and later)

The ClickHouse fork branch ClickHouse/v5.0.3 (head 7508bbee8d2b) carries
the remaining ClickHouse patch (fallback scanner honours
SIMDJSON_UTF8VALIDATION) rebased onto upstream v5.0.3. The previous
BIGINT_NUMBER patch for 20-digit uint64-overflowing integers is now
upstream and was dropped from the fork.

Only src/simdjson.cpp (the amalgamation) is compiled by
contrib/simdjson-cmake, and no top-level source files were added or
removed, so the CMake integration is unchanged.

Co-Authored-By: Claude Code <[email protected]>
@thevar1able thevar1able added the can be tested Allows running workflows for external contributors label Oct 8, 2026
@clickhouse-gh

clickhouse-gh Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [44f1aa1]

Summary: ✅


AI Review

Summary

Updates simdjson from v4.6.11 to v5.0.8, retaining the ClickHouse UTF-8 validation patch and adding the x86-only SSE2 selector guard. No actionable findings at PR head 44f1aa13011b6ce4cd5a9699c4bbad92ce9c61c7. Standalone differential probes matched for all 49,020 inputs across both revisions and the default and scalar backends, including acceptance, DOM structure, string bytes, integer values, and floating-point bits. Both new-revision ASan/UBSan runs completed without diagnostics. Local execution covered the dependency on x86-64; a full ClickHouse build and native ARM, PPC, and LoongArch execution were not performed.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added pr-build Pull request with build/testing/packaging improvement submodule changed At least one submodule changed in this PR. comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. labels Oct 8, 2026
@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Oct 13, 2026
actueleai and others added 2 commits October 30, 2026 22:11
The ClickHouse fork branch ClickHouse/v5.0.8 (head be21d521a67a) carries the
ClickHouse patch series rebased onto upstream v5.0.8:

- `fallback: honour SIMDJSON_UTF8VALIDATION in the scalar string scanner`
  (carried over from the previous bump);
- `Restrict the SSE2 key-selector path to real x86`, new in this bump: the
  `__SSE2__` guard in `include/simdjson/generic/ondemand/key_selector.h` is
  narrowed to the x86 architectures, because the ppc64le build defines
  `__SSE2__` globally for x86-intrinsics emulation and the SSE2 key-selector
  path does not compile there.

Upstream v5.0.8 brings the rewritten `json_string_builder`, the on-demand
`json_path`/wildcard support, `include/simdjson/jsonpathutil.h`, the new
`internal/jeaiii.h` digit-pair tables, and per-architecture stringparsing
cleanups. None of the top-level files compiled by `contrib/simdjson-cmake`
were added, removed or renamed, so the CMake integration is unchanged:
`contrib/simdjson-cmake/CMakeLists.txt` still compiles only
`src/simdjson.cpp`, and the ppc64le `SIMDJSON_EXPERIMENTAL_HAS_SSE2=0` define
and the LoongArch `-include asm/hwcap.h` workaround are kept as they are.

Differential check with `clickhouse local` (`allow_simdjson=1`) against the
master binary (simdjson v4.6.11): big integers into `Int128`/`UInt256`/
`Dynamic`, `BIGINT_NUMBER` rejection, malformed and truncated documents,
malformed UTF-8, nested `JSONExtract`, `JSONExtractKeysAndValuesRaw`,
`JSONExtractArrayRaw`, float extremes and subnormals, long strings and
`cityHash64` over 20000-row batches — stdout and stderr byte-identical.

Co-Authored-By: Claude Code <[email protected]>
@actueleai actueleai changed the title Bump simdjson from v4.6.11 to v5.0.3 Bump simdjson from v4.6.11 to v5.0.8 Oct 30, 2026
@clickhouse-gh

clickhouse-gh Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

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

⚠️ Significant changes: object file sizes.

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 ⚠️

12 object files changed (-940.45 KiB total), 0 added.

Object file Master PR Δ
contrib/simdjson-cmake/CMakeFiles/_simdjson.dir/__/simdjson/src/simdjson.cpp.o 202.27 KiB 470.66 KiB +268.40 KiB (+132.70%)
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/JSONArrayLength.cpp.o 541.26 KiB 297.63 KiB -243.63 KiB (-45.01%)
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/FunctionsJSON.cpp.o 4.83 MiB 4.59 MiB -241.34 KiB (-4.88%)
src/Functions/CMakeFiles/clickhouse_functions_obj.dir/FunctionSQLJSON.cpp.o 1.17 MiB 959.44 KiB -237.21 KiB (-19.82%)
src/CMakeFiles/dbms.dir/Formats/JSONExtractTree.cpp.o 1.42 MiB 1.32 MiB -98.23 KiB (-6.76%)
src/CMakeFiles/clickhouse_common_io.dir/Common/JSONParsers/SimdJSONParser.cpp.o 182.01 KiB 84.61 KiB -97.40 KiB (-53.51%)
src/CMakeFiles/dbms.dir/Storages/StorageFuzzJSON.cpp.o 684.29 KiB 586.94 KiB -97.35 KiB (-14.23%)
src/CMakeFiles/dbms.dir/DataTypes/Serializations/SerializationJSON.cpp.o 334.41 KiB 237.34 KiB -97.07 KiB (-29.03%)
src/CMakeFiles/dbms.dir/DataTypes/DataTypeObject.cpp.o 763.47 KiB 666.83 KiB -96.64 KiB (-12.66%)

711 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

15 translation units recompiled, 73 s compile time in total, 15 of them have a recent master baseline.

Job report

@Algunenano
Algunenano added this pull request to the merge queue Nov 18, 2026
Merged via the queue into ClickHouse:master with commit 80806f2 Nov 18, 2026
193 checks passed
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 18, 2026
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-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. manual approve Manual approve required to run CI pr-build Pull request with build/testing/packaging improvement pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants