[python] Align data directories with Java and enable Native IO - #10249
Merged
JingsongLi merged 2 commits intoSep 28, 2026
Merged
Conversation
leaves12138
approved these changes
Sep 28, 2026
Contributor
There was a problem hiding this comment.
Reviewed commit 03420e9c8b78e7e6d8e63e43e81b6dd0f8252ec6 together with apache/paimon-rust#974.
Fixed and pushed the findings from this review:
- Match Java path normalization for relative leading-colon components and empty paths under scheme/authority-only parents, including explicit Windows-mode tests.
- Preserve literal
%,?, and#characters in configuredfile:data directories. Previously Python URL decoding and Rust literal-path handling could write/read different physical locations. The fix covers generated data paths, the native split/deletion-vector bridge, and generated external paths without globally changingLocalFileIOURL behavior. - Added cross-backend tests for literal directories: append/PK/data-evolution, partitioned/unpartitioned reads, batch/stream writes, updates, deletion vectors, historical reads, abort cleanup, and round-robin/entropy-inject/weight-robin external paths.
- Marked the inherited Python-internal streaming test as
python_write, so both batch and stream variants still execute their Python instrumentation instead of incorrectly asserting that native execution invokes Python internals.
Validation:
- Paired native suite using Rust
2a46e49fe7433165bf066c1e4c6abac8cf3cec60and PyArrow 18.1.0: 1,748 passed, 4 skipped, 143 subtests passed; all five native execution families were exercised. - Python-backend regression suite: 313 passed, 51 skipped, 14 subtests passed.
- Actual Java
Pathoracle: 960 POSIX/Windows input combinations, of which Java accepted 893; all 893 accepted inputs matched. The 67 inputs rejected by Java were excluded from the string-result comparison. - Repository-configured flake8, Python 3.6 grammar checks for changed files, and
git diff --check: passed.
No remaining blocking code-review findings for these paired revisions. Keep the existing dependency and draft status: merge apache/paimon-rust#974 first, then rerun and require the Python Native CI against upstream Rust main before merging this PR. The successful local validation used the paired Rust revision, not the older upstream-main wheel from the previous CI run. I have not changed the CI dependency or merged either PR. LGTM for the reviewed code.
JingsongLi
marked this pull request as ready for review
September 28, 2026 05:14
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
Enable Native planning, reading, writing, updating, and committing for Paimon tables using
data-file.path-directory, and fix Python path resolution to follow Java.Depends on apache/paimon-rust#974. This PR stays in draft until that change is on
paimon-rust@main; the CI dependency remainsapache/paimon-rust@main.Tests
Using a locally built binding from the companion Rust PR and PyArrow 18.1, with all five Native CI flags enabled:
Pathimplementation: 311 POSIX/Windows oracle cases matched; representative expected outputs are committed as regression tests.No Native fork pin or CI dependency override is introduced. Native CI is expected to require the Rust dependency above before it can pass on this branch.