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; }