Fokko commented on code in PR #9049:
URL: https://github.com/apache/iceberg/pull/9049#discussion_r1411644693
##########
core/src/main/java/org/apache/iceberg/TableMetadata.java:
##########
@@ -846,6 +846,92 @@ private static Map<String, SnapshotRef> validateRefs(
return inputRefs;
}
+ @Override
+ @SuppressWarnings("CyclomaticComplexity")
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TableMetadata that = (TableMetadata) o;
+ return formatVersion == that.formatVersion
Review Comment:
@nastra is more the Javaista here, what are your thoughts here? This does
not seem to be very maintainable.
##########
api/src/main/java/org/apache/iceberg/Schema.java:
##########
@@ -507,4 +508,25 @@ public String toString() {
.map(this::identifierFieldToString)
.collect(Collectors.toList())));
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
Review Comment:
More on the style, I think this is easier to read:
```suggestion
if (o instanceof Schema) {
```
--
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]