You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by GitBox <gi...@apache.org> on 2021/08/17 13:39:10 UTC

[GitHub] [orc] belugabehr commented on a change in pull request #739: ORC-838: Implement Improvements to ByteBufferAllocatorPool

belugabehr commented on a change in pull request #739:
URL: https://github.com/apache/orc/pull/739#discussion_r690380095



##########
File path: java/core/src/java/org/apache/orc/impl/RecordReaderUtils.java
##########
@@ -504,38 +504,33 @@ static void readDiskRanges(FSDataInputStream file,
     private static final class Key implements Comparable<Key> {
       private final int capacity;
       private final long insertionGeneration;
+      private final int hash;
 
       Key(int capacity, long insertionGeneration) {
         this.capacity = capacity;
         this.insertionGeneration = insertionGeneration;
+        this.hash = new HashCodeBuilder().append(capacity).append(insertionGeneration)

Review comment:
       Excellent observation.  Thanks.  I will leave the current implementation in case the Collection ever changes down the road to a HashMap.




-- 
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: dev-unsubscribe@orc.apache.org

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