Skip to content

Commit

Permalink
chore(query): use column memory size as group by hash approx size
Browse files Browse the repository at this point in the history
  • Loading branch information
zhang2014 committed Sep 20, 2023
1 parent bb24881 commit ba0c142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/query/expression/src/kernels/group_by_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ impl HashMethod for HashMethodSerializer {
group_columns: &[(Column, DataType)],
rows: usize,
) -> Result<KeysState> {
let mut approx_size = 0;
let mut approx_size = group_columns.len() * rows * 10;

for (column, _data_type) in group_columns {
approx_size += column.memory_size();
Expand Down

0 comments on commit ba0c142

Please sign in to comment.