Skip to content

Commit d47dc80

Browse files
Merge 82ae5b4 into 4b411f4
2 parents 4b411f4 + 82ae5b4 commit d47dc80

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

ydb/library/yql/minikql/comp_nodes/mkql_wide_combine.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -675,24 +675,27 @@ class TSpillingSupportState : public TComputationValue<TSpillingSupportState> {
675675

676676
void SwitchMode(EOperatingMode mode, TComputationContext& ctx) {
677677
switch(mode) {
678-
case EOperatingMode::InMemory:
678+
case EOperatingMode::InMemory: {
679679
MKQL_ENSURE(false, "Internal logic error");
680680
break;
681-
case EOperatingMode::Spilling:
681+
}
682+
case EOperatingMode::Spilling: {
682683
MKQL_ENSURE(EOperatingMode::InMemory == Mode, "Internal logic error");
683684
SpilledBuckets.resize(SpilledBucketCount);
685+
auto spiller = ctx.SpillerFactory->CreateSpiller();
684686
for (auto &b: SpilledBuckets) {
685-
auto spiller = ctx.SpillerFactory->CreateSpiller();
686687
b.SpilledState = std::make_unique<TWideUnboxedValuesSpillerAdapter>(spiller, KeyAndStateType, 5_MB);
687688
b.SpilledData = std::make_unique<TWideUnboxedValuesSpillerAdapter>(spiller, UsedInputItemType, 5_MB);
688689
b.InMemoryProcessingState = std::make_unique<TState>(MemInfo, KeyWidth, KeyAndStateType->GetElementsCount() - KeyWidth, Hasher, Equal);
689690
}
690691
SplitStateIntoBuckets();
691692
break;
692-
case EOperatingMode::ProcessSpilled:
693+
}
694+
case EOperatingMode::ProcessSpilled: {
693695
MKQL_ENSURE(EOperatingMode::Spilling == Mode, "Internal logic error");
694696
MKQL_ENSURE(SpilledBuckets.size() == SpilledBucketCount, "Internal logic error");
695697
break;
698+
}
696699

697700
}
698701
Mode = mode;

0 commit comments

Comments
 (0)