Skip to content

Fix delta_kernel_ffi unused_unsafe build warnings - #106381

Merged
Algunenano merged 1 commit into
ClickHouse:masterfrom
Algunenano:fix-delta-kernel-unused-unsafe-warnings
Jun 8, 2026
Merged

Algunenano merged 1 commit into
ClickHouse:masterfrom
Algunenano:fix-delta-kernel-unused-unsafe-warnings

Conversation

@Algunenano

@Algunenano Algunenano commented Jun 3, 2026 •

Copy link
Copy Markdown
Member

The catch_unwind guards added in #106109 wrap their body in an outer unsafe block, and the closure inside inherits that unsafe context. The inner unsafe around unwrap_and_parse_path_as_url and log_paths was therefore redundant and produced four unused_unsafe warnings on every build of delta_kernel_ffi (table_changes.rs:51, table_changes.rs:77, lib.rs:642, lib.rs:686).

This bumps the delta-kernel-rs fork to drop those inner unsafe blocks; the standalone get_engine_builder / get_default_engine keep theirs since they are not nested. Verified that delta_kernel_ffi now compiles with zero warnings.

Closes #106223

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

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

Removed spurious unused_unsafe compiler warnings emitted when building the bundled delta-kernel-rs FFI.

Version info

  • Merged into: 26.6.1.511

The catch_unwind guards added in ClickHouse#106109 wrap their body in an outer `unsafe`
block, so the inner `unsafe` around `unwrap_and_parse_path_as_url` and
`log_paths` inside the closures was redundant and emitted four `unused_unsafe`
warnings on every build. Bump the delta-kernel-rs fork to drop those inner
blocks.

Closes ClickHouse#106223

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [624edae]

Summary: ✅


AI Review

Summary

This PR bumps contrib/delta-kernel-rs from 609a93b33560cd64d2d062e000ecd609fe5d0edd to 857565caf9ac61511c0e005ee3a32a30877a1a15, a one-commit update that removes redundant nested unsafe blocks in delta_kernel_ffi while keeping the enclosing unsafe context around catch_unwind_into_extern_result. I did not find correctness, safety, PR metadata, or evidence issues that warrant inline review comments.

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. labels Jun 3, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

📊 Cloud Performance Report

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

This PR only bumps the delta-kernel-rs submodule, which affects DeltaLake table integration and not the core query-execution path. ClickBench Q18 is a plain SELECT over the hits table that never touches delta-kernel code, so the flagged -5.2% improvement cannot plausibly be attributed to this change. Downgraded to not-sure: the delta is run-to-run variance rather than a real PR effect.

clickbench

⚠️ 1 inconclusive

Flagged queries (1 of 43)
Query Verdict Baseline med (ms) PR med (ms) Change q-value Hint
⚠️ 18 not_sure 1430 1355 -5.2% 0.0004 PR only bumps delta-kernel-rs submodule; ClickBench Q18 SELECT path untouched, so -5.2% is run-to-run variance

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

🟢 No significant changes

Debug info
  • StressHouse run: d80818d3-64e8-43b1-848d-3c5b485e5d20
  • MIRAI run: c0aa4232-5570-4187-9cc8-66a9db55e03b
  • PR check IDs:
    • clickbench_4515_1780915667
    • clickbench_4732_1780915695
    • clickbench_4830_1780915759
    • tpch_adapted_1_official_4851_1780915760
    • tpch_adapted_1_official_5038_1780915890
    • tpch_adapted_1_official_5190_1780916152

@Algunenano

Copy link
Copy Markdown
Member Author

@groeneai Can you review this PR please?

@Algunenano
Algunenano enabled auto-merge June 8, 2026 16:30
@Algunenano
Algunenano added this pull request to the merge queue Jun 8, 2026
Merged via the queue into ClickHouse:master with commit d0534d7 Jun 8, 2026
166 checks passed
@Algunenano
Algunenano deleted the fix-delta-kernel-unused-unsafe-warnings branch June 8, 2026 16:57
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 8, 2026
SmitaRKulkarni added a commit that referenced this pull request Jun 18, 2026
…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]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…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
ClickHouse#106109 and
ClickHouse#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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

delta_kernel_ffi build warnings

2 participants