This is an automated email from the ASF dual-hosted git repository.

JingsongLi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 1c13dfb098 [Python] Compute writer min/max statistics with a single 
Arrow call (#10800)
1c13dfb098 is described below

commit 1c13dfb098d0a2afafa57341ea9aadc50989b267
Author: zhigang <[email protected]>
AuthorDate: Mon Oct 26 14:25:05 2026 +0800

    [Python] Compute writer min/max statistics with a single Arrow call (#10800)
---
 .../pypaimon/execution/python/write/writer/data_writer.py      | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git 
a/paimon-python/pypaimon/execution/python/write/writer/data_writer.py 
b/paimon-python/pypaimon/execution/python/write/writer/data_writer.py
index 35ced92da2..edabf75404 100644
--- a/paimon-python/pypaimon/execution/python/write/writer/data_writer.py
+++ b/paimon-python/pypaimon/execution/python/write/writer/data_writer.py
@@ -378,8 +378,9 @@ class DataWriter(ABC):
             # PK files can contain a deduplicated or split subset of the
             # buffer. Java records the range of the rows actually written.
             sequences = data.column('_SEQUENCE_NUMBER')
-            min_seq = pc.min(sequences).as_py()
-            max_seq = pc.max(sequences).as_py()
+            minmax = pc.min_max(sequences)
+            min_seq = minmax["min"].as_py()
+            max_seq = minmax["max"].as_py()
         else:
             min_seq = self.sequence_generator.start
             max_seq = self.sequence_generator.current
@@ -604,8 +605,9 @@ class DataWriter(ABC):
                 "null_counts": column_array.null_count,
             }
         
-        min_values = pc.min(column_array).as_py()
-        max_values = pc.max(column_array).as_py()
+        minmax = pc.min_max(column_array)
+        min_values = minmax["min"].as_py()
+        max_values = minmax["max"].as_py()
         null_counts = column_array.null_count
         return {
             "min_values": min_values,

Reply via email to