Rachelint opened a new issue, #16135: URL: https://github.com/apache/datafusion/issues/16135
### Is your feature request related to a problem or challenge? After #15961, in `GroupValuesPrimitive`, we store the `hash` of group to speed up rehashing. However, I found the bottleneck of `rehashing` is not hash computation, it is actually randomly access to the `values`. So, after experimenting, the better is: - We directly store the `group value` in `map` - So, during probing we can perform `eq` in-place - And, during rehashing we just perform the cheap hash computation for `group value` But for the `large primitives`, it may be still better to store their hashes in `map` rather than themselves, otherwise it will make `map` too large and lead to possible regression. ### Describe the solution you'd like _No response_ ### Describe alternatives you've considered _No response_ ### Additional context _No response_ -- 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: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org