From 5389eeec3acf4d5ba97b82c7d39fcd15018a219a Mon Sep 17 00:00:00 2001 From: Askwang <135721692+Askwang@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:26:11 +0800 Subject: [PATCH] fix --- .../src/main/java/org/apache/paimon/utils/SnapshotManager.java | 3 +-- .../test/java/org/apache/paimon/utils/SnapshotManagerTest.java | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) 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);