bharos commented on code in PR #15840:
URL: https://github.com/apache/iceberg/pull/15840#discussion_r3034143994
##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/source/SparkTable.java:
##########
@@ -466,15 +467,15 @@ public boolean equals(Object other) {
return false;
}
- // use only name in order to correctly invalidate Spark cache
SparkTable that = (SparkTable) other;
- return icebergTable.name().equals(that.icebergTable.name());
+ return icebergTable.name().equals(that.icebergTable.name())
+ && Objects.equals(snapshotId, that.snapshotId)
+ && Objects.equals(branch, that.branch);
}
@Override
public int hashCode() {
- // use only name in order to correctly invalidate Spark cache
- return icebergTable.name().hashCode();
+ return Objects.hash(icebergTable.name(), snapshotId, branch);
Review Comment:
Done — added `Objects.equals(table().uuid(), that.table().uuid())` to match
v4.1.
##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/source/SparkTable.java:
##########
@@ -466,15 +467,15 @@ public boolean equals(Object other) {
return false;
}
- // use only name in order to correctly invalidate Spark cache
SparkTable that = (SparkTable) other;
- return icebergTable.name().equals(that.icebergTable.name());
+ return icebergTable.name().equals(that.icebergTable.name())
Review Comment:
Done — added `table().uuid()` to `Objects.hash()` to match v4.1.
--
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]