Repository navigation
[core] Support authorized raw file planning for native scans - #1197
Merged
JingsongLi merged 4 commits intoOct 22, 2026
Merged
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
Allow PyPaimon's existing file-scanner API to use Rust Core rather than constructing a Python executor. Preserve the separation between raw manifest metadata and query results.
Brief change log
TableScan::plan_files()andFileScanPlanfor complete manifest entries and the selected snapshot ID. File metadata planning precedes projection, LIMIT, row selection, global-index refinement and split distribution.with_file_filters; bothplan()andplan_files()use the explicit configuration. Unconfigured queries retain their current defaults; unconfigured raw file plans include L0 and pending buckets, matching the lower-level Java FileStoreScan. Explicit L0 reads keep overlapping primary-key versions together through split packing and sharding.plan_all()across Core, bindings and callers. It returns a splitPlan;plan_files()returns complete manifest entries. Predicates, LIMIT and authorization behavior stay unchanged.ManifestEntryvalues through the Python bindings. No custom Python manifest-source or follow-up-scanner callback is added.Review follow-up
plan_all()remove only L0 exclusion while preserving independently configured real/pending-bucket policies. Keep explicit false overrides andwith_scan_all_files().plan_files()composition consistent, with the existing split-packing behavior.Tests
Final review regressions: 33 distinct Rust tests passed (snapshot suite 18, file-scan suite 5 with 2 overlapping tests, timestamp suite 7, REST suite 4 and binding suite 1).
API rename follow-up: 5 passed, 0 failed, covering L0 policies, 11 mutation paths, REST authorization, all DE column files and the renamed Python binding (including LIMIT preservation).
Rust 1.98.0 targeted runtime tests: 16 passed, 0 failed.
cargo +1.98.0 clippy --locked --all-targets --workspace --features fulltext,vortex -- -D warnings: passed.cargo +1.98.0 fmt --all -- --checkandgit diff --check: passed.No Native Python extension was built or installed for these tests.
API and Format
Adds
TableScan::plan_files,TableScan::with_file_filters,FileScanPlanand corresponding Python bindings. No storage-format change or new configuration option.Documentation
Rust API documentation and Python type stubs describe the file-planning and authorization boundary. PyPaimon's integration is in apache/paimon#10742.