jackye1995 commented on code in PR #6965:
URL: https://github.com/apache/iceberg/pull/6965#discussion_r1133016107
##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/SparkTable.java:
##########
@@ -248,21 +268,25 @@ public ScanBuilder
newScanBuilder(CaseInsensitiveStringMap options) {
icebergTable.refresh();
}
- CaseInsensitiveStringMap scanOptions = addSnapshotId(options, snapshotId);
- return new SparkScanBuilder(sparkSession(), icebergTable,
snapshotSchema(), scanOptions);
+ CaseInsensitiveStringMap scanOptions =
+ branch != null ? options : addSnapshotId(options, snapshotId);
+ return new SparkScanBuilder(
+ sparkSession(), icebergTable, branch, snapshotSchema(), scanOptions);
}
@Override
public WriteBuilder newWriteBuilder(LogicalWriteInfo info) {
Preconditions.checkArgument(
- snapshotId == null, "Cannot write to table at a specific snapshot:
%s", snapshotId);
+ branch != null || snapshotId == null,
Review Comment:
updated!
--
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]