zanmato1984 commented on code in PR #39800:
URL: https://github.com/apache/arrow/pull/39800#discussion_r1466730093


##########
cpp/src/arrow/compute/key_hash_avx2.cc:
##########
@@ -190,7 +190,7 @@ uint32_t Hashing32::HashFixedLenImp_avx2(uint32_t num_rows, 
uint64_t length,
   // Do not process rows that could read past the end of the buffer using 16
   // byte loads. Round down number of rows to process to multiple of 2.
   //
-  uint64_t num_rows_to_skip = bit_util::CeilDiv(length, kStripeSize);
+  uint64_t num_rows_to_skip = bit_util::CeilDiv(kStripeSize, length);

Review Comment:
   I guess you were thinking `length` is some kind of "total length" of all 
rows? But it actually represents the width of the fixed length type being 
hashed. See its call site:
   
https://github.com/apache/arrow/blob/9c0a7617d953a74abaec5c14318bc2f46d0d176a/cpp/src/arrow/compute/key_hash.cc#L431C69-L431C78



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

Reply via email to