wangzhigang1999 opened a new issue, #10799:
URL: https://github.com/apache/paimon/issues/10799

   ### Search before asking
   
   - [x] I searched the existing issues and found no report for this change.
   
   ### Motivation
   
   The Python writer calls Arrow `min` and `max` separately on the same input 
when computing column statistics in `DataWriter._get_column_stats` and 
primary-key sequence-number ranges in `DataWriter._data_file_statistics`. Both 
extrema are needed, so these reductions repeat work on the same input.
   
   ### Solution
   
   Compute both extrema with one Arrow `min_max` call at each site and extract 
its `min` and `max` fields. Preserve the existing empty/all-null handling, 
unsupported-type guards, null counts, and statistics fields.
   
   ### Anything else?
   
   This is a small implementation improvement in the Python writer. It does not 
introduce table options, change file formats, or raise the PyArrow dependency 
requirement. Validate it with the existing related writer tests.
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!
   


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