Repository navigation
[c] Expose current-state audit planning and Arrow reads - #1391
Open
suxiaogang223 wants to merge 1 commit into
Open
suxiaogang223 wants to merge 1 commit into
suxiaogang223 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Related issue: #1382 (current-state audit portion; does not close the issue).
C consumers can execute ordinary externally planned splits but cannot invoke the core current-state audit reader. Expose audit planning, schema export and assigned-split execution so a native worker can retain winning delete rows and return rowkind through Arrow without replanning the entire table.
Brief change log
paimon_read_builder_plan_audit, delegating to the core audit planner with the builder's table view, projection, case sensitivity and filters. Do not apply LIMIT pruning.paimon_table_export_audit_arrow_schema, exporting rowkind, the configured optional sequence number and user fields through the Arrow C Data Interface.paimon_table_read_to_audit_log_arrow, reusing AuditLogRead for selected complete splits, including a plan imported with the existing DataSplit byte API. Propagate read predicates and resource contexts.External planners remain responsible for complete audit merge groups, including first-row and deletion-vector overlap boundaries. This binding does not repair a plan that already discarded required files. System-column residual filters and final LIMIT remain with the caller.
Tests
cargo +1.95.0 test --locked -p paimon-c --lib: 101 passed.-D warnings -A clippy::nonminimal_bool. Strict Clippy's six existing nonminimal-bool errors were reproduced on unmodified main; no source lint suppressions were added.cc -std=c11 -fsyntax-only.cargo +1.95.0 fmt --all -- --checkandgit diff --check: passed.Local Cargo builds used debug info disabled and incremental compilation disabled. The new persisted-data tests exercise deduplicate primary-key Parquet reads. First-row/DV grouping and other format behavior are delegated to existing core implementations, rather than newly reimplemented or exhaustively retested here. Full workspace and cross-platform CI are not claimed as local validation.
API and Format
Three additive C functions; existing exported structs, signatures and storage formats are unchanged. Returned plans and readers use existing free functions. This is current-state audit output, not an event history or an incremental read API.
Snapshot-interval planning, incremental work-unit transport and Delta/Changelog/Diff execution remain open under #1382. No Java IncrementalSplit compatibility or Diff output equivalence is claimed by this PR.
Documentation
Document current-state planning and reading, external split requirements, output fields, lifetime rules and incremental scope in the C integration guide.
AI assistance: Codex helped develop the implementation, tests, and this description.