nastra commented on code in PR #9131:
URL: https://github.com/apache/iceberg/pull/9131#discussion_r1415084740
##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/sql/TestSelect.java:
##########
@@ -419,6 +420,12 @@ public void
testInvalidTimeTravelBasedOnBothAsOfAndTableIdentifier() {
})
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("Cannot do time-travel based on both table identifier and
AS OF");
+
+ // using branch_b1 in the table identifier and VERSION AS OF
+ Assertions.assertThatThrownBy(
+ () -> sql("SELECT * FROM %s.branch_b1 VERSION AS OF %s",
tableName, snapshotId))
+ .isInstanceOf(IllegalArgumentException.class)
+ .hasMessage("Cannot do time-travel based on both table identifier and
AS OF");
Review Comment:
I've applied this and moved this to
https://github.com/apache/iceberg/pull/9219
##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/SparkCatalog.java:
##########
@@ -171,7 +171,7 @@ public Table loadTable(Identifier ident, String version)
throws NoSuchTableExcep
SparkTable sparkTable = (SparkTable) table;
Preconditions.checkArgument(
- sparkTable.snapshotId() == null,
+ sparkTable.snapshotId() == null && sparkTable.branch() == null,
Review Comment:
I've applied this and moved this to
https://github.com/apache/iceberg/pull/9219
--
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]