alamb commented on code in PR #24418:
URL: https://github.com/apache/datafusion/pull/24418#discussion_r3807634318


##########
datafusion/physical-plan/src/aggregates/group_values/multi_group_by/dictionary.rs:
##########
@@ -296,9 +301,22 @@ impl<K: ArrowDictionaryKeyType + Send + Sync> GroupColumn
             }
             Some(val_idx) => {
                 let dict_values = dict.values();
-                let single = dict_values.slice(val_idx, 1);
-                self.hash_values(&single);
-                self.find_or_insert_value(dict_values, val_idx, 
self.val_hashes[0])?
+                let cache_hit = self

Review Comment:
   this looks clever -- but it would be nice to add some comments explaining 
what it does -- namely avoid re-hashing a dictionary when the subsequent batch 
is the same dictionary as previous



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