linliu-code opened a new pull request, #782:
URL: https://github.com/apache/hudi-rs/pull/782

   ## What this is
   
   Position **3 of 4** in a series porting work from Onehouse's `hudi-rs` fork 
onto upstream `main`. The series is linear and must land in order: **01 → 02 → 
03 → 04**.
   
   **Draft** — this cannot merge until #780 and any earlier position land.
   
   A PR to `apache/hudi-rs` must be based on a branch in this repository, so 
the series cannot be stacked on GitHub. This branch therefore carries the 
earlier positions' commits too, and the "Files changed" view is cumulative. 
**The work unique to this PR is 13 commits, `650af3bd..1c6e09c6`** — please 
review those.
   
   ## What it does
   
   Ports Onehouse's C++ (cxx) bridge onto the OSS core, behind a deliberately 
narrow `ffi_support` facade, so the bridge depends on one declared surface 
rather than reaching into `hudi-core` internals.
   
   - `crates/core/src/ffi_support/mod.rs` — the facade: a re-export surface 
plus a process-wide object-store runtime and a stream-stats handle. 
`crates/core/tests/visibility.rs` asserts the seam **at compile time**, so 
widening it fails the build rather than a review.
   - `cpp/src/` — the bridge: context, provider ABI, predicate translation, and 
a blocking merge-stream adapter.
   
   ## Scale, and how to review it
   
   This is large, and most of it is not new. Roughly **7,600 lines are vendored 
or moved** and verified byte-identical (or near-identical) against their 
existing originals; about **700 lines are genuinely new logic**, concentrated 
in `blocking_merge_stream.rs`, the `ffi_support` facade, and `engine.rs`'s 
`open()` / `stream_stats_handle()`. The rest is tests. Reviewing the facade 
plus those 700 lines is the high-value pass.
   
   ## Known, and stated deliberately
   
   - **The provider path is dormant.** Neither entry point calls 
`with_base_file_provider`, and the stats `OnceLock` is never set. Both paths 
`warn_once!` if a caller supplies a handle. This is Phase 1; the wiring lands 
later.
   - **A panic in the merge would abort the process.** 
`BlockingMergeStream::next` is reached from arrow-rs's `extern "C" fn 
get_next`, which carries no `catch_unwind`. The one nameable panic source 
(tokio re-entry) is guarded; the general case is not.
   - **One error path leaks the provider handle.** 
`new_file_group_reader_with_context` reclaims it after a fallible 
`Storage::new`, so a failure in between leaks the `ctx`. One-line move, no ABI 
change.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to