File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
paimon-core/src/main/java/org/apache/paimon/table/system
paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,8 @@ public RecordReader<InternalRow> createReader(Split split) throws IOException {
182182 throw new IllegalArgumentException ("Unsupported split: " + split .getClass ());
183183 }
184184
185- List <PartitionEntry > partitions = fileStoreTable .newScan ().listPartitionEntries ();
185+ List <PartitionEntry > partitions =
186+ fileStoreTable .newScan ().withLevelFilter (level -> true ).listPartitionEntries ();
186187
187188 @ SuppressWarnings ("unchecked" )
188189 CastExecutor <InternalRow , BinaryString > partitionCastExecutor =
Original file line number Diff line number Diff line change @@ -1025,4 +1025,14 @@ public void testLevel0FileCanBeReadForFilesTable() {
10251025 sql ("INSERT INTO test_table VALUES (1, 'A')" );
10261026 assertThat (sql ("SELECT * FROM `test_table$files`" )).isNotEmpty ();
10271027 }
1028+
1029+ @ Test
1030+ public void testLevel0FileCanBeReadForPartitionsTable () {
1031+ sql (
1032+ "CREATE TABLE test_table (a int PRIMARY KEY NOT ENFORCED, b string, dt string) "
1033+ + "PARTITIONED BY (dt)"
1034+ + "WITH ('deletion-vectors.enabled' = 'true', 'write-only' = 'true');" );
1035+ sql ("INSERT INTO test_table VALUES (1, 'A', '2024-12-01')" );
1036+ assertThat (sql ("SELECT * FROM `test_table$partitions`" )).isNotEmpty ();
1037+ }
10281038}
You can’t perform that action at this time.
0 commit comments