amogh-jahagirdar commented on code in PR #5150:
URL: https://github.com/apache/iceberg/pull/5150#discussion_r939705382


##########
api/src/main/java/org/apache/iceberg/TableScan.java:
##########
@@ -49,6 +49,16 @@ public interface TableScan extends Scan<TableScan, 
FileScanTask, CombinedScanTas
    */
   TableScan asOfTime(long timestampMillis);
 
+  /**
+   * Create a new {@link TableScan} from this scan's configuration that will 
use the most recent
+   * snapshot as of the given snapshot ref.
+   *
+   * @param snapshotRef a snapshot Ref
+   * @return a new scan based on this with the given snapshot Ref
+   * @throws IllegalArgumentException if the snapshot cannot be found
+   */
+  TableScan useSnapshotRef(String snapshotRef);

Review Comment:
   I think we need to separate the useBranch and useTag APIs. As you said, refs 
are internal. From a Spark user perspective we also want to only expose the 
branch/tag terms; imo I think the same case could be applied to the API level. 
Also considering branches can be combined with time travel we could do a 
separate API for that ; although there's an argument to be made to just combine 
useBranch + as Of Time.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to