Rich-T-kid commented on code in PR #27025:
URL: https://github.com/apache/datafusion/pull/27025#discussion_r4456072306


##########
datafusion/common/src/hash_utils.rs:
##########
@@ -158,8 +181,14 @@ where
         let mut buffer = cell.try_borrow_mut()
             .map_err(|_| _internal_datafusion_err!("with_hashes cannot be 
called reentrantly on the same thread"))?;
 
-        // Ensure buffer has sufficient length, clearing old values
-        buffer.clear();
+        // A dictionary with non-null keys and values overwrites every output

Review Comment:
   Direct A/B: restoring `buffer.clear()` was 1.04x slower for multiple 
dictionaries (10.4 vs. 10.0 µs) and 1.16x slower for a single dictionary (3.2 
vs. 2.8 µs). I think that win is worth keeping now that the overwrite invariant 
is covered by the debug checks. Kept the skip in `90f551c9c`. 
[Run](https://github.com/apache/datafusion/pull/27025#issuecomment-6606411962).



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