amogh-jahagirdar commented on code in PR #5364:
URL: https://github.com/apache/iceberg/pull/5364#discussion_r954285254
##########
core/src/main/java/org/apache/iceberg/BaseTableScan.java:
##########
@@ -86,20 +90,56 @@ public TableScan appendsAfter(long fromSnapshotId) {
public TableScan useSnapshot(long scanSnapshotId) {
Preconditions.checkArgument(
snapshotId() == null, "Cannot override snapshot, already set to
id=%s", snapshotId());
+ Preconditions.checkArgument(
+ ref() == null, "Cannot override snapshot, already set to id=%s",
ref());
Review Comment:
I think we can actually remove this validation; if a ref is set we always
set a snapshot as well. This snapshot can either be a tag, tip of a branch, or
the snapshot from a time travel on the branch.
The snapshot check on the line before is sufficient validation; although the
error message won't indicate the ref is set. I can include that in the error
message if that's desired?
--
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]