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 0c41d57cea [core] Fix that FilesTable cannot output level0 files when
dv enabled (#6414)
0c41d57cea is described below
commit 0c41d57cea9edf0ac1d19198c994bf5e2dc83069
Author: yuzelin <[email protected]>
AuthorDate: Thu Oct 16 19:20:41 2025 +0800
[core] Fix that FilesTable cannot output level0 files when dv enabled
(#6414)
---
.../src/main/java/org/apache/paimon/table/system/FilesTable.java | 3 +++
.../test/java/org/apache/paimon/flink/BatchFileStoreITCase.java | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git
a/paimon-core/src/main/java/org/apache/paimon/table/system/FilesTable.java
b/paimon-core/src/main/java/org/apache/paimon/table/system/FilesTable.java
index eb18e679f5..caa8315eb9 100644
--- a/paimon-core/src/main/java/org/apache/paimon/table/system/FilesTable.java
+++ b/paimon-core/src/main/java/org/apache/paimon/table/system/FilesTable.java
@@ -274,6 +274,9 @@ public class FilesTable implements ReadonlyTable {
return levelPredicate.test(
GenericRow.of(null, null, null, null,
null, level));
});
+ } else {
+ // avoid that batchScanSkipLevel0 is true
+ scan.withLevelFilter(level -> true);
}
return scan.plan();
}
diff --git
a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/BatchFileStoreITCase.java
b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/BatchFileStoreITCase.java
index 13425014f5..30b2e6d0fd 100644
---
a/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/BatchFileStoreITCase.java
+++
b/paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/BatchFileStoreITCase.java
@@ -1016,4 +1016,13 @@ public class BatchFileStoreITCase extends
CatalogITCaseBase {
"SELECT * FROM T /*+
OPTIONS('scan.dedicated-split-generation'='true') */"))
.hasSize(0);
}
+
+ @Test
+ public void testLevel0FileCanBeReadForFilesTable() {
+ sql(
+ "CREATE TABLE test_table (a int PRIMARY KEY NOT ENFORCED, b
string) "
+ + "WITH ('deletion-vectors.enabled' = 'true',
'write-only' = 'true');");
+ sql("INSERT INTO test_table VALUES (1, 'A')");
+ assertThat(sql("SELECT * FROM `test_table$files`")).isNotEmpty();
+ }
}