From e68f45cc517f931782c9ca2cb06a142427a62bef Mon Sep 17 00:00:00 2001 From: stdpain <34912776+stdpain@users.noreply.github.com> Date: Fri, 18 Oct 2024 16:02:17 +0800 Subject: [PATCH] [BugFix] Fix spill cost too much memory when enable group execution (#51935) Signed-off-by: stdpain Signed-off-by: stdpain <34912776+stdpain@users.noreply.github.com> --- be/src/exec/spill/mem_table.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/be/src/exec/spill/mem_table.cpp b/be/src/exec/spill/mem_table.cpp index 72d6bc1319f16..5be9eb691109e 100644 --- a/be/src/exec/spill/mem_table.cpp +++ b/be/src/exec/spill/mem_table.cpp @@ -116,6 +116,8 @@ Status OrderedMemTable::flush(FlushCallBack callback) { _tracker->release(consumption); COUNTER_ADD(_spiller->metrics().mem_table_peak_memory_usage, -consumption); _chunk.reset(); + _permutation.clear(); + _permutation.shrink_to_fit(); return Status::OK(); }