nastra commented on code in PR #9455:
URL: https://github.com/apache/iceberg/pull/9455#discussion_r1485011353
##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkTable.java:
##########
@@ -405,15 +407,18 @@ public boolean equals(Object other) {
return false;
}
- // use only name in order to correctly invalidate Spark cache
+ // use name only unless branch/snapshotId is given in order to correctly
invalidate Spark cache
+ // when branch or snapshotId is given, it's time travel
SparkTable that = (SparkTable) other;
- return icebergTable.name().equals(that.icebergTable.name());
+ return icebergTable.name().equals(that.icebergTable.name())
+ && Objects.equals(snapshotId, that.snapshotId);
Review Comment:
I think the snippet with the normalized branch makes sense from a first
glance. I'm still curious how the `CachingCatalog` will behave, since it only
caches by table name and doesn't respect the branch name
--
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]