Skip to content

Commit 108d66d

Browse files
GitLab-BotGitLab-Bot
authored andcommitted
fix format
1 parent 9500a7f commit 108d66d

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

paimon-core/src/main/java/org/apache/paimon/table/FallbackReadFileStoreTable.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,10 @@ public InnerTableScan withPartitionsFilter(List<Map<String, String>> partitions)
481481
if (partitions != null) {
482482
List<Map<String, String>> fallbackPartitions =
483483
partitions.stream()
484-
.map(p -> trimPartitionSpecToKeys(p, fallbackSchema.partitionKeys()))
484+
.map(
485+
p ->
486+
trimPartitionSpecToKeys(
487+
p, fallbackSchema.partitionKeys()))
485488
.collect(Collectors.toList());
486489
fallbackScan.withPartitionsFilter(fallbackPartitions);
487490
setPartitionPredicate(
@@ -503,7 +506,8 @@ public InnerTableScan withPartitionsFilter(List<Map<String, String>> partitions)
503506
public InnerTableScan withPartitionFilter(PartitionPredicate partitionPredicate) {
504507
mainScan.withPartitionFilter(partitionPredicate);
505508
// Do not push main-schema PartitionPredicate to fallback; fallback listing uses
506-
// fallbackPartitionPredicate which was set via withFilter/withPartitionFilter(Predicate)
509+
// fallbackPartitionPredicate which was set via
510+
// withFilter/withPartitionFilter(Predicate)
507511
if (partitionPredicate != null) {
508512
setPartitionPredicate(partitionPredicate);
509513
}
@@ -642,8 +646,8 @@ protected PartitionPredicate getFallbackPartitionPredicate() {
642646
*
643647
* <p>When schemas differ (e.g. main has (dt, a, b) and fallback has (dt)), a fallback
644648
* partition {dt=X} is covered if main has ANY partition with the same dt value. Comparison
645-
* is done by projecting main partition rows to the fallback key columns using
646-
* object-array serialization.
649+
* is done by projecting main partition rows to the fallback key columns using object-array
650+
* serialization.
647651
*/
648652
private Set<BinaryRow> findCoveredFallbackPartitions(
649653
List<BinaryRow> mainPartitions, List<BinaryRow> fallbackPartitions) {

paimon-core/src/test/java/org/apache/paimon/table/FallbackReadFileStoreTableTest.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,7 @@ public void testFallbackWithSubsetPartitionKeys() throws Exception {
237237
new String[] {"dt", "a", "val"});
238238

239239
// Main table: partitioned by (dt, a)
240-
Path mainPath =
241-
new Path(TraceableFileIO.SCHEME + "://" + tempDir.toString() + "/main");
240+
Path mainPath = new Path(TraceableFileIO.SCHEME + "://" + tempDir.toString() + "/main");
242241
FileIO mainFileIO = FileIOFinder.find(mainPath);
243242
TableSchema mainSchema =
244243
SchemaUtils.forceCommit(
@@ -296,7 +295,8 @@ public void testFallbackWithSubsetPartitionKeys() throws Exception {
296295

297296
// Case 1: WHERE dt=20250811 — only delta data; fallback dt=20250810 not included
298297
DataTableScan scan1 = combined.newScan();
299-
scan1.withFilter(builder.equal(0, org.apache.paimon.data.BinaryString.fromString("20250811")));
298+
scan1.withFilter(
299+
builder.equal(0, org.apache.paimon.data.BinaryString.fromString("20250811")));
300300
List<Split> splits1 = scan1.plan().splits();
301301
// dt=20250811 is owned by main branch; should be 1 non-fallback split
302302
assertThat(splits1).isNotEmpty();
@@ -306,7 +306,8 @@ public void testFallbackWithSubsetPartitionKeys() throws Exception {
306306

307307
// Case 2: WHERE dt=20250810 — only fallback data; delta has no dt=20250810
308308
DataTableScan scan2 = combined.newScan();
309-
scan2.withFilter(builder.equal(0, org.apache.paimon.data.BinaryString.fromString("20250810")));
309+
scan2.withFilter(
310+
builder.equal(0, org.apache.paimon.data.BinaryString.fromString("20250810")));
310311
List<Split> splits2 = scan2.plan().splits();
311312
// dt=20250810 not in main; must be read from fallback
312313
assertThat(splits2).isNotEmpty();
@@ -327,7 +328,8 @@ public void testFallbackWithSubsetPartitionKeys() throws Exception {
327328
DataTableScan scan3 = combined.newScan();
328329
scan3.withFilter(
329330
PredicateBuilder.and(
330-
builder.equal(0, org.apache.paimon.data.BinaryString.fromString("20250811")),
331+
builder.equal(
332+
0, org.apache.paimon.data.BinaryString.fromString("20250811")),
331333
builder.equal(1, org.apache.paimon.data.BinaryString.fromString("aaa"))));
332334
List<Split> splits3 = scan3.plan().splits();
333335
assertThat(splits3).isNotEmpty();

0 commit comments

Comments
 (0)