You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "ctrlaltdilj (via GitHub)" <gi...@apache.org> on 2024/06/03 05:05:20 UTC

Re: [PR] added greater and less than query optimization to snapshot table queries [paimon]

ctrlaltdilj commented on code in PR #3396:
URL: https://github.com/apache/paimon/pull/3396#discussion_r1623787596


##########
paimon-core/src/main/java/org/apache/paimon/utils/SnapshotManager.java:
##########
@@ -364,6 +365,20 @@ public Iterator<Snapshot> snapshots() throws IOException {
                 .iterator();
     }
 
+    public Iterator<Snapshot> snapshotsWithinRange(Long maxSnapshotId, Long minSnapshotId)
+            throws IOException {
+        // check for specific snapshot
+        if (Objects.equals(maxSnapshotId, minSnapshotId)) {
+            return Collections.singletonList(snapshot(maxSnapshotId)).iterator();
+        }
+
+        return listVersionedFiles(fileIO, snapshotDirectory(), SNAPSHOT_PREFIX)

Review Comment:
   Removed list call, lmk what you think



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org