From ba0c1424787560212631e01f8086b37cb3f36867 Mon Sep 17 00:00:00 2001 From: zhang2014 Date: Wed, 20 Sep 2023 14:49:46 +0800 Subject: [PATCH] chore(query): use column memory size as group by hash approx size --- src/query/expression/src/kernels/group_by_hash.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query/expression/src/kernels/group_by_hash.rs b/src/query/expression/src/kernels/group_by_hash.rs index bdb0ae8c20a9..3445bf38e8a7 100644 --- a/src/query/expression/src/kernels/group_by_hash.rs +++ b/src/query/expression/src/kernels/group_by_hash.rs @@ -219,7 +219,7 @@ impl HashMethod for HashMethodSerializer { group_columns: &[(Column, DataType)], rows: usize, ) -> Result { - 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();