Skip to content

Commit

Permalink
fix order
Browse files Browse the repository at this point in the history
  • Loading branch information
xuyu committed Oct 11, 2024
1 parent 743586b commit 4e101e4
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public static Snapshot resolveSnapshotFromOption(
scanHandleKey.add(key);
}
}

if (scanHandleKey.size() == 0) {
return null;
}
if (scanHandleKey.size() > 1) {
throw new IllegalArgumentException(
String.format(
Expand All @@ -49,9 +53,7 @@ public static Snapshot resolveSnapshotFromOption(
CoreOptions.SCAN_WATERMARK.key(),
CoreOptions.SCAN_TIMESTAMP_MILLIS.key()));
}
if (scanHandleKey.size() == 0) {
return null;
}

String key = scanHandleKey.get(0);
Snapshot snapshot = null;
if (key.equals(CoreOptions.SCAN_SNAPSHOT_ID.key())) {
Expand Down

0 comments on commit 4e101e4

Please sign in to comment.