diff --git a/paimon-core/src/main/java/org/apache/paimon/utils/SnapshotManager.java b/paimon-core/src/main/java/org/apache/paimon/utils/SnapshotManager.java index 1ae16e4bb622..72b620ea265f 100644 --- a/paimon-core/src/main/java/org/apache/paimon/utils/SnapshotManager.java +++ b/paimon-core/src/main/java/org/apache/paimon/utils/SnapshotManager.java @@ -682,8 +682,7 @@ public static int findPreviousSnapshot(List sortedSnapshots, long targ return -1; } - private static int findNextOrEqualTag( - List sortedSnapshots, long targetSnapshotId) { + private static int findNextOrEqualTag(List sortedSnapshots, long targetSnapshotId) { for (int i = 0; i < sortedSnapshots.size(); i++) { if (sortedSnapshots.get(i).id() >= targetSnapshotId) { return i; diff --git a/paimon-core/src/test/java/org/apache/paimon/utils/SnapshotManagerTest.java b/paimon-core/src/test/java/org/apache/paimon/utils/SnapshotManagerTest.java index b879dadf963f..0cb82e894484 100644 --- a/paimon-core/src/test/java/org/apache/paimon/utils/SnapshotManagerTest.java +++ b/paimon-core/src/test/java/org/apache/paimon/utils/SnapshotManagerTest.java @@ -380,7 +380,8 @@ public void testOverlappedSnapshots() { int beginInclusive = 10, endExclusive = 15; // overlapped snapshot is [11,12] List overlappedSnapshots = - SnapshotManager.findOverlappedSnapshots(taggedSnapshot, beginInclusive, endExclusive); + SnapshotManager.findOverlappedSnapshots( + taggedSnapshot, beginInclusive, endExclusive); List overlappedIds = overlappedSnapshots.stream().map(Snapshot::id).collect(Collectors.toList()); assertThat(overlappedIds).containsExactly(11L, 12L);