From 573c965ef1cd02cd86436bd58d4d490e8040cc17 Mon Sep 17 00:00:00 2001 From: Filitov Mikhail Date: Thu, 23 Jan 2025 12:05:21 +0000 Subject: [PATCH] clear states only in outofmemory case --- yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp b/yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp index 883502b7e645..b1e6286b6a66 100644 --- a/yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp +++ b/yql/essentials/minikql/comp_nodes/mkql_wide_combine.cpp @@ -325,6 +325,10 @@ class TState : public TComputationValue { } + if (IsOutOfMemory) { + States = std::make_unique(Hash, Equal, CountRowsOnPage); + } + CurrentPage = &Storage.emplace_back(RowSize() * CountRowsOnPage, NUdf::TUnboxedValuePod()); CurrentPosition = 0; Tongue = CurrentPage->data(); @@ -332,8 +336,6 @@ class TState : public TComputationValue { IsOutOfMemory = false; Rows = 0; - - States = std::make_unique(Hash, Equal, CountRowsOnPage); CleanupCurrentContext(); return true; }