You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/09/28 01:34:39 UTC

[GitHub] [iotdb] wangchao316 commented on a change in pull request #4044: [To rel/0.12] [IOTDB-1726] Wrong hashCode() and equals() method in ChunkMetadata

wangchao316 commented on a change in pull request #4044:
URL: https://github.com/apache/iotdb/pull/4044#discussion_r717156857



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/ChunkMetadata.java
##########
@@ -224,16 +228,12 @@ public boolean equals(Object o) {
     ChunkMetadata that = (ChunkMetadata) o;
     return offsetOfChunkHeader == that.offsetOfChunkHeader
         && version == that.version
-        && Objects.equals(measurementUid, that.measurementUid)
-        && tsDataType == that.tsDataType
-        && Objects.equals(deleteIntervalList, that.deleteIntervalList)
-        && Objects.equals(statistics, that.statistics);
+        && partialFilePathForCache.equals(that.partialFilePathForCache);

Review comment:
       hi,  equals and hashcode can not only use for cache,  ChunkMetadata have other place for judgments. 
   test case have some fail.




-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org