jackye1995 commented on code in PR #5364:
URL: https://github.com/apache/iceberg/pull/5364#discussion_r930576346
##########
api/src/main/java/org/apache/iceberg/TableScan.java:
##########
@@ -53,6 +53,30 @@ 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 tip snapshot of the given branch
+ *
+ * @param branch a snapshot ID
+ * @return a new scan based on this with the given snapshot ID
+ * @throws IllegalArgumentException if the branch cannot be found
+ */
+ default TableScan useBranch(String branch) {
+ throw new UnsupportedOperationException("Scanning from a branch is not
supported");
+ }
+
+ /**
+ * Create a new {@link TableScan} from this scan's configuration that will
use the most recent snapshot
+ * as of the given time in milliseconds.
+ *
+ * @param branch branch name
+ * @param timestampMillis a timestamp in milliseconds.
+ * @return a new scan based on this with the given branch and timestamp
+ * @throws IllegalArgumentException if the branch or snapshot cannot be found
+ */
+ default TableScan useBranch(String branch, long timestampMillis) {
Review Comment:
what about `asOfTimeAtBranch`?
--
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]