Beyyes commented on a change in pull request #31: Fix sonar URL: https://github.com/apache/incubator-iotdb/pull/31#discussion_r251015627
########## File path: iotdb/src/main/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReader.java ########## @@ -126,5 +126,22 @@ public int compareTo(Element o) { return o.priority.compareTo(this.priority); } + + @Override + public boolean equals(Object o){ + if (o instanceof Element){ + Element element = (Element) o; + if (this.timeValuePair.getTimestamp() == element.timeValuePair.getTimestamp() + && this.priority.equals(element.priority)){ + return true; + } + } + return false; + } + + @Override + public int hashCode(){ + return (int) (timeValuePair.getTimestamp() * 37 + priority.hashCode()); Review comment: int is ok?? timeValuePair.getTimestamp() is long type. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services