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

lzljs3620320 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 eca41dd054 [core] Fix reporting PartitionStatistics params construct 
bug (#5528)
eca41dd054 is described below

commit eca41dd054975d6e3ae5bf2075424f5dcbd6b4cc
Author: gavin9402 <[email protected]>
AuthorDate: Sun Apr 27 12:44:01 2025 +0800

    [core] Fix reporting PartitionStatistics params construct bug (#5528)
---
 .../java/org/apache/paimon/utils/PartitionStatisticsReporter.java  | 2 +-
 .../org/apache/paimon/utils/PartitionStatisticsReporterTest.java   | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/paimon-core/src/main/java/org/apache/paimon/utils/PartitionStatisticsReporter.java
 
b/paimon-core/src/main/java/org/apache/paimon/utils/PartitionStatisticsReporter.java
index bd8bef8996..8b045c4800 100644
--- 
a/paimon-core/src/main/java/org/apache/paimon/utils/PartitionStatisticsReporter.java
+++ 
b/paimon-core/src/main/java/org/apache/paimon/utils/PartitionStatisticsReporter.java
@@ -84,7 +84,7 @@ public class PartitionStatisticsReporter implements Closeable 
{
 
             PartitionStatistics partitionStats =
                     new PartitionStatistics(
-                            partitionSpec, fileCount, totalSize, rowCount, 
modifyTimeMillis);
+                            partitionSpec, rowCount, totalSize, fileCount, 
modifyTimeMillis);
             LOG.info("alter partition {} with statistic {}.", partitionSpec, 
partitionStats);
             
partitionHandler.alterPartitions(Collections.singletonList(partitionStats));
         }
diff --git 
a/paimon-core/src/test/java/org/apache/paimon/utils/PartitionStatisticsReporterTest.java
 
b/paimon-core/src/test/java/org/apache/paimon/utils/PartitionStatisticsReporterTest.java
index ea1b504df4..29c84bf347 100644
--- 
a/paimon-core/src/test/java/org/apache/paimon/utils/PartitionStatisticsReporterTest.java
+++ 
b/paimon-core/src/test/java/org/apache/paimon/utils/PartitionStatisticsReporterTest.java
@@ -75,6 +75,11 @@ public class PartitionStatisticsReporterTest {
                         BinaryString.fromString("a"),
                         BinaryString.fromString("a"),
                         BinaryString.fromString("a")));
+        writer.write(
+                GenericRow.of(
+                        BinaryString.fromString("a"),
+                        BinaryString.fromString("c"),
+                        BinaryString.fromString("c")));
         writer.write(
                 GenericRow.of(
                         BinaryString.fromString("b"),
@@ -129,7 +134,7 @@ public class PartitionStatisticsReporterTest {
         assertThat(partitionParams).containsKey("c1=a/");
         assertThat(partitionParams.get("c1=a/").toString())
                 .isEqualTo(
-                        "{spec={c1=a}, recordCount=1, fileSizeInBytes=662, 
fileCount=1, lastFileCreationTime=1729598544974}");
+                        "{spec={c1=a}, recordCount=2, fileSizeInBytes=705, 
fileCount=1, lastFileCreationTime=1729598544974}");
         action.close();
         assertThat(closed).isTrue();
     }

Reply via email to