gortiz commented on code in PR #8766:
URL: https://github.com/apache/pinot/pull/8766#discussion_r881295029


##########
pinot-core/src/main/java/org/apache/pinot/core/query/pruner/ColumnValueSegmentPruner.java:
##########
@@ -99,6 +102,11 @@ public List<IndexSegment> prune(List<IndexSegment> 
segments, QueryContext query)
 
     int numSegments = segments.size();
     List<IndexSegment> selectedSegments = new ArrayList<>(numSegments);
+
+    // By using an IdentityHashMap, we may be creating more entries, but each 
lookup will be faster
+    // which should compensate in cases where there are hundreds of segments
+    Map<Object, Hash128> hashCache = new IdentityHashMap<>();

Review Comment:
   As shown by @Jackie-Jiang, in the equals case it is not correct to use the 
identity, so I'm going to use a normal map 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to