chunweilei commented on a change in pull request #2016:
URL: https://github.com/apache/calcite/pull/2016#discussion_r442609980
##########
File path: core/src/main/java/org/apache/calcite/rel/core/Window.java
##########
@@ -394,16 +394,24 @@ public RexWinAggCall(
this.ignoreNulls = ignoreNulls;
}
- /** {@inheritDoc}
- *
- * <p>Override {@link RexCall}, defining equality based on identity.
- */
- @Override public boolean equals(Object obj) {
- return this == obj;
+ @Override public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ if (!super.equals(o)) {
+ return false;
+ }
+ RexWinAggCall that = (RexWinAggCall) o;
+ return ordinal == that.ordinal
+ && distinct == that.distinct
+ && ignoreNulls == that.ignoreNulls;
}
@Override public int hashCode() {
- return Objects.hash(digest, ordinal, distinct);
+ return Objects.hash(super.hashCode(), ordinal, distinct, ignoreNulls);
}
Review comment:
Nice catch.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]