JingsongLi commented on code in PR #9954:
URL: https://github.com/apache/paimon/pull/9954#discussion_r4045967468


##########
paimon-python/pypaimon/read/native_plan.py:
##########
@@ -327,6 +372,14 @@ def native_plan(
     # Trimmed primary keys decode per-file min/max keys (PK merge-on-read).
     kfields = table.trimmed_primary_keys_fields
     splits = [deserialize_split_v1(split.serialize(), pfields, kfields) for 
split in rust_splits]
+    if table.options.native_read_enabled():
+        # Retain the opaque Rust split next to the Python metadata view. The
+        # normal planner/reader contract remains a Python Split list, while
+        # native reads can consume the exact Rust split without a second lossy
+        # conversion. Any Python split transformation creates a fresh object
+        # without this marker and thus safely falls back to the Python reader.
+        for split, rust_split in zip(splits, rust_splits):
+            split._native_split = rust_split

Review Comment:
   Fixed in be669d58e2. Whenever `_restore_python_partition_paths()` changes a 
file path, it now invalidates that split’s retained `_native_split`, so 
`_try_native_batches()` falls back before invoking Rust. The integration test 
now enables both native planning and native reading for the `a/b` legacy 
partition case, verifies the rows, and asserts that `native_read` was not 
called.



-- 
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