puzpuzpuz commented on code in PR #18952:
URL: https://github.com/apache/druid/pull/18952#discussion_r2737845339


##########
processing/src/main/java/org/apache/druid/query/groupby/epinephelinae/ByteBufferHashTable.java:
##########
@@ -300,35 +300,81 @@ protected int findBucket(
     final int startBucket = keyHash % buckets;
     int bucket = startBucket;
 
-    outer:
+    // Pre-compute hash with used flag for comparison.
+    final int keyHashWithUsedFlag = Groupers.getUsedFlag(keyHash);
+    final int keyBufferPosition = keyBuffer.position();
+
     while (true) {
       final int bucketOffset = bucket * bucketSizeWithHash;
+      final int storedHashWithUsedFlag = 
targetTableBuffer.getInt(bucketOffset);
 
-      if ((targetTableBuffer.get(bucketOffset) & 0x80) == 0) {
+      if ((storedHashWithUsedFlag & 0x80000000) == 0) {

Review Comment:
   Addressed in 5fb014f77031c39e49a0f4e57c1ef2e0a38a1420



-- 
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