reuvenlax commented on code in PR #40791:
URL: https://github.com/apache/beam/pull/40791#discussion_r4396374731
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/values/RowWithGetters.java:
##########
@@ -140,16 +138,19 @@ public boolean equals(@Nullable Object o) {
}
if (o instanceof RowWithGetters) {
RowWithGetters other = (RowWithGetters) o;
- return Objects.equals(getSchema(), other.getSchema())
- && Objects.equals(getterTarget, other.getterTarget);
- } else if (o instanceof Row) {
+ if (Objects.equals(getSchema(), other.getSchema())
+ && Objects.equals(getterTarget, other.getterTarget)) {
+ return true;
+ }
+ }
+ if (o instanceof Row) {
return super.equals(o);
}
return false;
}
@Override
public int hashCode() {
- return Objects.hash(getSchema(), getterTarget);
+ return super.hashCode();
Review Comment:
why change hashCode here?
--
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]