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 b63b25d895 [core] Add min/max row id for manifest table (#6929)
b63b25d895 is described below

commit b63b25d8951b44c1a4e820d6a1e31c95b238e97f
Author: YeJunHao <[email protected]>
AuthorDate: Tue Dec 30 15:10:22 2025 +0800

    [core] Add min/max row id for manifest table (#6929)
---
 .../java/org/apache/paimon/table/system/ManifestsTable.java   |  8 ++++++--
 .../org/apache/paimon/table/system/ManifestsTableTest.java    |  4 +++-
 .../test/java/org/apache/paimon/flink/CatalogTableITCase.java | 11 +++++++++++
 3 files changed, 20 insertions(+), 3 deletions(-)

diff --git 
a/paimon-core/src/main/java/org/apache/paimon/table/system/ManifestsTable.java 
b/paimon-core/src/main/java/org/apache/paimon/table/system/ManifestsTable.java
index fe5224b139..0813e838f3 100644
--- 
a/paimon-core/src/main/java/org/apache/paimon/table/system/ManifestsTable.java
+++ 
b/paimon-core/src/main/java/org/apache/paimon/table/system/ManifestsTable.java
@@ -87,7 +87,9 @@ public class ManifestsTable implements ReadonlyTable {
                             new DataField(
                                     6,
                                     "max_partition_stats",
-                                    SerializationUtils.newStringType(true))));
+                                    SerializationUtils.newStringType(true)),
+                            new DataField(7, "min_row_id", new 
BigIntType(true)),
+                            new DataField(8, "max_row_id", new 
BigIntType(true))));
 
     private final FileStoreTable dataTable;
 
@@ -224,7 +226,9 @@ public class ManifestsTable implements ReadonlyTable {
                     manifestFileMeta.numDeletedFiles(),
                     manifestFileMeta.schemaId(),
                     
partitionCastExecutor.cast(manifestFileMeta.partitionStats().minValues()),
-                    
partitionCastExecutor.cast(manifestFileMeta.partitionStats().maxValues()));
+                    
partitionCastExecutor.cast(manifestFileMeta.partitionStats().maxValues()),
+                    manifestFileMeta.minRowId(),
+                    manifestFileMeta.maxRowId());
         }
     }
 
diff --git 
a/paimon-core/src/test/java/org/apache/paimon/table/system/ManifestsTableTest.java
 
b/paimon-core/src/test/java/org/apache/paimon/table/system/ManifestsTableTest.java
index 7afd079b0d..3a4507c5b6 100644
--- 
a/paimon-core/src/test/java/org/apache/paimon/table/system/ManifestsTableTest.java
+++ 
b/paimon-core/src/test/java/org/apache/paimon/table/system/ManifestsTableTest.java
@@ -237,7 +237,9 @@ public class ManifestsTableTest extends TableTestBase {
                                             manifestFileMeta
                                                     .partitionStats()
                                                     .maxValues()
-                                                    .getInt(0)))));
+                                                    .getInt(0))),
+                            manifestFileMeta.minRowId(),
+                            manifestFileMeta.maxRowId()));
         }
         return expectedRow;
     }
diff --git 
a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/CatalogTableITCase.java
 
b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/CatalogTableITCase.java
index 7acb35c814..38a1bc8a1d 100644
--- 
a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/CatalogTableITCase.java
+++ 
b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/CatalogTableITCase.java
@@ -247,6 +247,17 @@ public class CatalogTableITCase extends CatalogITCaseBase {
         assertThat(result).containsExactlyInAnyOrder(Row.of(1L, 0L), 
Row.of(1L, 0L));
     }
 
+    @Test
+    public void testManifestsTableWihRowId() {
+        sql(
+                "CREATE TABLE T (a INT, b INT) WITH 
('data-evolution.enabled'='true', 'row-tracking.enabled'='true')");
+        sql("INSERT INTO T VALUES (1, 2), (3, 4)");
+        sql("INSERT INTO T VALUES (5, 6), (7, 8)");
+
+        List<Row> result = sql("SELECT min_row_id, max_row_id FROM 
T$manifests");
+        assertThat(result).containsExactlyInAnyOrder(Row.of(0L, 1L), 
Row.of(2L, 3L));
+    }
+
     @Test
     public void testSchemasTable() {
         sql(

Reply via email to