sundapeng opened a new pull request, #10620:
URL: https://github.com/apache/paimon/pull/10620

   ### Purpose
   
   #10609 reads planning counters with `rust_plan.stats()`. pypaimon-rust 
0.4.0, the release that the `Python / Tests` jobs install, has no 
`Plan.stats()`, so every native plan raises `AttributeError` and falls back to 
the Python scanner:
   
   ```
   Native plan failed, falling back to the Python scanner: 
'pypaimon_rust.datafusion.Plan' object has no attribute 'stats'
   ```
   
   Since then 
`ContiguousWindowPlanTest.test_native_plan_retains_independent_payload_column_files`
 fails on master on Python 3.10 to 3.13, and on every PR that merges with it. 
Native CI builds pypaimon-rust from `main`, which has `stats()`, so it still 
passes there.
   
   This PR reads the counters only when the binding provides `stats()`, as 
`_from_native_plan` already does for `snapshot_id`. With an older binding the 
plan stays native and reports no native statistics, as before #10609.
   
   ### Tests
   
   - `native_plan_test.py` adds 
`test_bindings_without_plan_stats_still_plan_natively`, which fails without the 
fix.
   - With pypaimon-rust 0.4.0 installed and `-m 'not native_plan'`, 
`contiguous_window_plan_test.py` fails before the fix and passes with it.
   


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