Skip to content

Bump delta-kernel-rs to v23 - #105861

Merged
SmitaRKulkarni merged 19 commits into
masterfrom
create_table_deltalake
Jul 7, 2026
Merged

SmitaRKulkarni merged 19 commits into
masterfrom
create_table_deltalake

Conversation

@SmitaRKulkarni

@SmitaRKulkarni SmitaRKulkarni commented May 26, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

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

Bump delta-kernel-rs to v23

This is needed for (#103155)

Version info

  • Merged into: 26.7.1.578 (included in 26.7 and later)

@clickhouse-gh

clickhouse-gh Bot commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [8d3cfd1]

Summary: ✅


AI Review

Summary

This PR bumps delta-kernel-rs to v23, rewires the DeltaLake integration to the new FFI surfaces, and adds targeted regression coverage for the bool/binary literal and column-mapping write fixes. The current head looks much better on the FFI-safety side, but one partitioned-write contract violation still remains, so I would not approve it as-is.

Findings

❌ Blockers
[src/Storages/ObjectStorage/DataLakes/DeltaLake/WriteTransaction.cpp:184-187] [dismissed by author -- https://github.com//pull/105861#discussion_r3531951202] The new partitioned-table fallback still treats every v23 partitioned write as the default "drop partition columns from Parquet" layout. That is no longer universally safe: v23's WriteContext can keep partition columns in the physical Parquet schema when materializePartitionColumns or IcebergCompatV3 is enabled, but this branch bypasses WriteContext entirely and later routes the data through DeltaLakePartitionedSink, which still hard-codes partition_columns_in_data_file = false at src/Storages/ObjectStorage/DataLakes/DeltaLake/DeltaLakePartitionedSink.cpp:61-66. On such tables ClickHouse will successfully commit files that omit required partition columns. Suggested fix: until partitioned WriteContext FFI is available, reject partitioned tables whose physical write layout differs from the default Hive path / no-partition-columns-in-file contract; otherwise plumb the partitioned WriteContext physical schema and logical_to_physical transform through the sink.

Final Verdict

Status: ⚠️ Request changes
Minimum required actions: handle the non-default partitioned-write layouts introduced by the v23 WriteContext contract instead of always forcing the default Hive/no-materialized-partition-columns path, and keep that path covered with a focused regression test.

@SmitaRKulkarni
SmitaRKulkarni requested a review from kssenii May 26, 2026 14:29
@clickhouse-gh clickhouse-gh Bot added pr-improvement Pull request with some product improvements submodule changed At least one submodule changed in this PR. labels May 26, 2026
SmitaRKulkarni and others added 2 commits June 18, 2026 12:51
…safety cherry-picks)

Cherry-pick the FFI panic-safety and builder-leak fixes from master's
delta-kernel-rs pointer onto the v0.23.0-based rebase-onto-v0.23.0 branch:

  ffi: make set_builder_option return an error instead of panicking
  ffi: add free_engine_builder to release a builder without building it
  ffi: guard snapshot and builder_build with catch_unwind
  ffi: guard table-changes (CDF) FFI exports with catch_unwind
  ffi: drop redundant inner unsafe blocks in catch_unwind closures

These correspond to the changes introduced by
#106109 and
#106381, re-applied on top of
the v0.23.0 rebase so this branch keeps the standalone snapshot FFI
functions guarded with catch_unwind.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Conflict resolutions:
- contrib/delta-kernel-rs: keep ours (e0052d1b, the v0.23.0-based
  rebase-onto-v0.23.0 with the FFI panic-safety cherry-picks).
- contrib/delta-kernel-rs-cmake/CMakeLists.txt: adopt master's
  default-engine-native-tls backend (matches master's OpenSSL CFLAGS/include
  plumbing) plus our v0.23.0 'arrow' feature.
- rust/workspace/Cargo.lock + contrib/rust_vendor: regenerated via
  rust/vendor.sh for the merged tree (rust_vendor -> 920cda415).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
required by delta-kernel-rs v0.23.0 (e.g. chrono 0.4.44), causing
"failed to select a version for the requirement chrono = ^0.4.41
(locked to 0.4.44)". 415a0a644 re-vendors the missing deps so the directory
is a superset of every committed Cargo.lock.
@SmitaRKulkarni
SmitaRKulkarni requested a review from kssenii June 23, 2026 13:18
@kssenii kssenii self-assigned this Jun 25, 2026
@SmitaRKulkarni
SmitaRKulkarni requested a review from kssenii June 29, 2026 15:10
@SmitaRKulkarni

Copy link
Copy Markdown
Member Author

PR for rust_vendor : ClickHouse/rust_vendor#70

SmitaRKulkarni and others added 4 commits June 30, 2026 18:54
Points contrib/rust_vendor at the cleaned-up branch tip
(63a1e699d), rebased onto the latest rust_vendor master so it
sits on top of the real chdig v26.6.1 commit. The vendored
content is unchanged from the previous pointer.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member

Updating the branch to fix the 04001_join_reorder_through_expression and 03532_window_function_and_null_source_max_threads tests, which were broken today in master.

@clickhouse-gh

clickhouse-gh Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 85.60% 85.60% +0.00%
Functions 92.70% 92.70% +0.00%
Branches 77.80% 77.80% +0.00%

Changed lines: Changed C/C++ lines covered: 141/236 (59.75%) · Uncovered code

Full report · Diff report

@SmitaRKulkarni
SmitaRKulkarni added this pull request to the merge queue Jul 7, 2026
Merged via the queue into master with commit 1cc7f5b Jul 7, 2026
175 checks passed
@SmitaRKulkarni
SmitaRKulkarni deleted the create_table_deltalake branch July 7, 2026 08:36
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 7, 2026
@Algunenano

Copy link
Copy Markdown
Member

There are warnings in the build:

warning: unexpected `cfg` condition value: `catalog-managed`
   --> ffi/src/lib.rs:760:7
    |
760 | #[cfg(feature = "catalog-managed")]
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `arrow`, `arrow-57`, `arrow-58`, `default`, `default-engine-base`, `default-engine-native-tls`, `default-engine-rustls`, `delta-kernel-unity-catalog`, `internal-api`, `test-ffi`, `tracing`, `tracing-core`, and `tracing-subscriber`
    = help: consider adding `catalog-managed` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default

warning: unexpected `cfg` condition value: `catalog-managed`
   --> ffi/src/lib.rs:804:7
    |
804 | #[cfg(feature = "catalog-managed")]
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `arrow`, `arrow-57`, `arrow-58`, `default`, `default-engine-base`, `default-engine-native-tls`, `default-engine-rustls`, `delta-kernel-unity-catalog`, `internal-api`, `test-ffi`, `tracing`, `tracing-core`, and `tracing-subscriber`
    = help: consider adding `catalog-managed` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: unexpected `cfg` condition value: `catalog-managed`
   --> ffi/src/lib.rs:834:11
    |
834 |     #[cfg(feature = "catalog-managed")]
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `arrow`, `arrow-57`, `arrow-58`, `default`, `default-engine-base`, `default-engine-native-tls`, `default-engine-rustls`, `delta-kernel-unity-catalog`, `internal-api`, `test-ffi`, `tracing`, `tracing-core`, and `tracing-subscriber`
    = help: consider adding `catalog-managed` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

warning: `delta_kernel_ffi` (lib) generated 3 warnings

Could you have a look please?

@SmitaRKulkarni

Copy link
Copy Markdown
Member Author

oh will have a look and fix it soon

zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
thevar1able added a commit that referenced this pull request Nov 11, 2026
Bring the release branch to the same Rust toolchain and Rust contribs as
master, so that it shares master's `rust_vendor` commit (`c4fd435`):

- `nightly-2026-11-02` instead of `nightly-2025-07-07`.
- `wasmtime` v41 -> v45.0.1 (`561b224`), with the `ValType` API change in
  `WasmTimeRuntime.cpp` from #106836
  (also covers #98603 and
  #102603, which only moved the
  submodule).
- `delta-kernel-rs` v23 (`3ae3062`), with the FFI adaptations, tests and the
  `arrow` crate feature from #105861.
  The branch keeps its `default-engine-rustls` feature and its per-batch
  `add_files` loop in `WriteTransaction::commit`; only the `commit` call is
  changed to the committed-transaction API.
- `chdig` v26.10.1 (`a28e107`), with the `config.toml.in` sources from
  #103145,
  #110938 and
  #115216.
- `rust/workspace/Cargo.lock` re-resolved offline against that vendor commit.

Original PR: #128815

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

Labels

pr-improvement Pull request with some product improvements 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.

5 participants