marvinlanhenke commented on code in PR #10748:
URL: https://github.com/apache/datafusion/pull/10748#discussion_r1623275500


##########
datafusion/physical-plan/src/joins/hash_join.rs:
##########
@@ -875,23 +875,12 @@ async fn collect_left_input(
 
     // Estimation of memory size, required for hashtable, prior to allocation.
     // Final result can be verified using `RawTable.allocation_info()`
-    //
-    // For majority of cases hashbrown overestimates buckets qty to keep ~1/8 
of them empty.
-    // This formula leads to overallocation for small tables (< 8 elements) 
but fine overall.
-    let estimated_buckets = (num_rows.checked_mul(8).ok_or_else(|| {

Review Comment:
   Yes, I think this would be the cleanest solution. I wrote a comment in the 
issue, since this would require us to change the Accumulator trait; and I'm not 
sure we want to do this, for a probably rare edge-case? 



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