Skip to content

Bump arrow to 25.0.0, orc to 2.3.1 and xsimd to 14.2.0 - #112604

Merged
thevar1able merged 6 commits into
masterfrom
bump-arrow-25-orc-2.3.1
Aug 3, 2026
Merged

thevar1able merged 6 commits into
masterfrom
bump-arrow-25-orc-2.3.1

Conversation

@thevar1able

@thevar1able thevar1able commented Jul 30, 2026 •

Copy link
Copy Markdown
Member

Bumps three contribs that cannot be split apart:

  • arrow 23.0.1 -> 25.0.0
  • orc 2.1.2 -> 2.3.1
  • xsimd 14.0.0 -> 14.2.0

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

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

Update Apache Arrow to 25.0.0 and Apache ORC to 2.3.1.

Version info

  • Merged into: 26.8.1.701 (included in 26.8 and later)
  • Backported to: 26.7.3.18, 26.6.3.14, 26.5.7.15, 26.3.18.7

`xsimd` is tracked directly against upstream and carries no ClickHouse patches,
so this is a plain pointer move.

Required by `arrow` 25, which pins 14.2.0: `arrow/util/cpu_info.cc` uses
`xsimd::cpu_features`, `xsimd::x86_cpu_features_backend_default`,
`xsimd::x86_cpuid_leaf7` and `xsimd::x86_manufacturer`, none of which exist in
14.0.0.
The pinned fork was 2.1.2 plus 8 ClickHouse commits. Rebased onto
`rel/release-2.3.1`; the resulting fork history is 5 commits plus a vendored
schema update.

`Reject out-of-range union tags instead of reading out of bounds` was dropped:
upstream added `getCheckedUnionTag` and applies it at all three call sites
(`UnionColumnReader::skip` and both branches of `UnionColumnReader::next`), so
it is at least as complete as the local patch and checks at the point of use
rather than in a pre-pass. The other hardening patches are still absent
upstream and were kept: bounding type-tree nesting depth when reading the
footer, rejecting an out-of-range column id in
`StripeInformationImpl::getColumnEncoding`, and the `ColumnReader`
heap-use-after-free fix.

ORC does not ship its format definition in-tree; it reads `orc_proto.proto`
from an `orc-format` `ExternalProject` download, and we vendor the file in the
fork instead. The vendored copy still matched 2.1.2, so it had to be updated to
`orc-format` 1.1.1, which 2.3.1 pins - 2.3 added the geospatial types and the
C++ sources reference `proto::GeospatialStatistics`, `Type::crs`,
`Type::algorithm` and `Type_Kind_GEOMETRY`/`GEOGRAPHY`.

`add_custom_command` for `orc_proto.pb.h` had no `DEPENDS`, so the generated
sources were never regenerated when the schema or `protoc` changed and a stale
header was compiled instead. Adding the dependency is what makes the schema
update above take effect.

`Dictionary.cc`, `DictionaryLoader.cc` and `Geospatial.cc` are new upstream
sources that have to be compiled (`SortedStringDictionary`,
`loadStringDictionary`, `geospatial::WKBGeometryBounder`). `BpackingAvx512.cc`
is deliberately not added: upstream only builds it under
`BUILD_ENABLE_AVX512`, which we do not set.

2.3 also adds `GEOMETRY` and `GEOGRAPHY` to `orc::TypeKind`, so the exhaustive
switch in `orcUnionBranchMatchesType` has to handle them. We do not read those
types, so no target type can match such a union branch.
The pinned fork was 23.0.1 plus 11 ClickHouse commits. Rebased onto
`apache-arrow-25.0.0`; two patches were dropped as obsolete:

- `Fix deadlock with msan` and `Fix undefined symbol: pthread_atfork on
  PowerPC64` both target `AfterForkState`/`GlobalForkSafeMutex` in
  `util/mutex.cc`, which upstream removed outright - fork handling now lives in
  `util/atfork_internal.cc`.

`Dont abort in ~CerrLog` was kept but re-applied on top of upstream`s
refactoring, which now buffers into an `std::ostringstream buffer_` and prints
under a mutex. We keep the local behaviour (buffer, no `std::cerr` output,
throw instead of `PrintBackTrace` + `std::abort`) while adopting upstream`s
member name so the next rebase is smaller.

Upstream renamed the bit-packing SIMD sources: `bpacking_simd_default.cc` ->
`bpacking_simd_128.cc` and `bpacking_simd_avx2.cc` -> `bpacking_simd_256.cc`.
`util/ulp_distance.cc` (`internal::WithinUlp`) is new and has to be compiled.

Parquet Variant support moved out of `parquet/arrow/variant_internal.cc` into
the Arrow extension type `arrow/extension/parquet_variant.cc`, which upstream
builds unconditionally alongside the other extension types we already list.

`parquet/bloom_filter_avx2.cc` has to be built when AVX2 is available because
the Bloom filter dispatch table references `FindHashBlockAvx2`. Unlike
`level_comparison_avx2.cc`, which we list unconditionally, it instantiates
`xsimd::batch<uint32_t, xsimd::avx2>` and so is x86-only.

`arrow::decimal` was removed. It is deliberately not replaced with
`arrow::smallest_decimal`: Arrow gained `Decimal32` and `Decimal64`, so that
function would narrow small decimals and change the schema we write. The
explicit `Decimal256` above precision 38, `Decimal128` otherwise rule
reproduces what `arrow::decimal` did.

Requires `xsimd` 14.2.0, which Arrow 25 pins - `util/cpu_info.cc` uses
`xsimd::cpu_features`, `x86_cpu_features_backend_default`, `x86_cpuid_leaf7`
and `x86_manufacturer`, none of which exist in 14.0.0.
@clickhouse-gh

clickhouse-gh Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [799ac10]

Summary: ❌

job_name test_name status info comment
AST fuzzer (amd_debug, targeted) FAIL
Logical error: ColumnBLOB should be converted to a regular column before usage (STID: 3059-3663) FAIL cidb, issue ISSUE CREATED

AI Review

Summary

This PR bumps the vendored arrow, orc, and xsimd revisions and adjusts ClickHouse's local Arrow/ORC integration code to match the new upstream sources and APIs. I reviewed the current diff, the existing PR discussion, and the current code paths touched by the patch; the previously reported unreachable contrib/arrow SHA is fixed, current CI is all-green, and I did not find any new blockers or majors in the patch as it stands.

Final Verdict

✅ No actionable review findings in the current version of this PR.

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.50% 86.40% -0.10%
Functions 91.90% 91.90% +0.00%
Branches 78.70% 78.60% -0.10%

Changed lines: Changed C/C++ lines covered: 8/12 (66.67%) · Uncovered code

Full report · Diff report

@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. labels Jul 30, 2026
Comment thread contrib/arrow Resolved
@clickhouse-gh

clickhouse-gh Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.50% 86.50% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 78.60% 78.70% +0.10%

Changed lines: Changed C/C++ lines covered: 8/12 (66.67%) · Uncovered code

Full report · Diff report

@thevar1able
thevar1able requested a review from rschu1ze August 3, 2026 11:15
Comment thread .claude/skills/review/SKILL.md Resolved
rschu1ze

This comment was marked as resolved.

@rschu1ze rschu1ze self-assigned this Aug 3, 2026
@thevar1able
thevar1able dismissed rschu1ze’s stale review August 3, 2026 14:03

There are no unrelated changed files in this PR

@thevar1able thevar1able added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Aug 3, 2026
@thevar1able
thevar1able added this pull request to the merge queue Aug 3, 2026
Merged via the queue into master with commit c3582bb Aug 3, 2026
351 of 355 checks passed
@thevar1able
thevar1able deleted the bump-arrow-25-orc-2.3.1 branch August 3, 2026 18:55
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Aug 3, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 3, 2026
robot-clickhouse added a commit that referenced this pull request Aug 5, 2026
Cherry pick #112604 to 26.3: Bump `arrow` to 25.0.0, `orc` to 2.3.1 and `xsimd` to 14.2.0
robot-clickhouse added a commit that referenced this pull request Aug 5, 2026
robot-clickhouse added a commit that referenced this pull request Aug 5, 2026
Cherry pick #112604 to 26.5: Bump `arrow` to 25.0.0, `orc` to 2.3.1 and `xsimd` to 14.2.0
robot-clickhouse added a commit that referenced this pull request Aug 5, 2026
robot-clickhouse added a commit that referenced this pull request Aug 5, 2026
Cherry pick #112604 to 26.6: Bump `arrow` to 25.0.0, `orc` to 2.3.1 and `xsimd` to 14.2.0
robot-clickhouse added a commit that referenced this pull request Aug 5, 2026
robot-clickhouse added a commit that referenced this pull request Aug 5, 2026
Cherry pick #112604 to 26.7: Bump `arrow` to 25.0.0, `orc` to 2.3.1 and `xsimd` to 14.2.0
robot-clickhouse added a commit that referenced this pull request Aug 5, 2026
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Aug 5, 2026
clickhouse-gh Bot added a commit that referenced this pull request Aug 5, 2026
Backport #112604 to 26.7: Bump `arrow` to 25.0.0, `orc` to 2.3.1 and `xsimd` to 14.2.0
thevar1able added a commit that referenced this pull request Aug 7, 2026
Backport #112604 to 26.5: Bump `arrow` to 25.0.0, `orc` to 2.3.1 and `xsimd` to 14.2.0
thevar1able added a commit that referenced this pull request Aug 7, 2026
Backport #112604 to 26.6: Bump `arrow` to 25.0.0, `orc` to 2.3.1 and `xsimd` to 14.2.0
thevar1able added a commit that referenced this pull request Aug 7, 2026
Backport #112604 to 26.3: Bump `arrow` to 25.0.0, `orc` to 2.3.1 and `xsimd` to 14.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-build Pull request with build/testing/packaging improvement pr-must-backport Pull request should be backported intentionally. Use this label with great care! 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 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