Skip to content

Commit

Permalink
fix: remove additional and_then
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinlanhenke committed Jun 2, 2024
1 parent 33d24d1 commit eebf4cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datafusion/common/src/utils/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ pub fn estimate_memory_size<T>(num_elements: usize, fixed_size: usize) -> Result
// but should be fine overall.
num_elements
.checked_mul(8)
.and_then(|estimate| Some((estimate / 7).next_power_of_two()))
.and_then(|estimated_buckets| {
.and_then(|overestimate| {
let estimated_buckets = (overestimate / 7).next_power_of_two();
// + size of entry * number of buckets
// + 1 byte for each bucket
// + fixed size of collection (HashSet/HashTable)
Expand Down

0 comments on commit eebf4cf

Please sign in to comment.