Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions ydb/library/yql/minikql/comp_nodes/mkql_wide_combine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -675,24 +675,27 @@ class TSpillingSupportState : public TComputationValue<TSpillingSupportState> {

void SwitchMode(EOperatingMode mode, TComputationContext& ctx) {
switch(mode) {
case EOperatingMode::InMemory:
case EOperatingMode::InMemory: {
MKQL_ENSURE(false, "Internal logic error");
break;
case EOperatingMode::Spilling:
}
case EOperatingMode::Spilling: {
MKQL_ENSURE(EOperatingMode::InMemory == Mode, "Internal logic error");
SpilledBuckets.resize(SpilledBucketCount);
auto spiller = ctx.SpillerFactory->CreateSpiller();
for (auto &b: SpilledBuckets) {
auto spiller = ctx.SpillerFactory->CreateSpiller();
b.SpilledState = std::make_unique<TWideUnboxedValuesSpillerAdapter>(spiller, KeyAndStateType, 5_MB);
b.SpilledData = std::make_unique<TWideUnboxedValuesSpillerAdapter>(spiller, UsedInputItemType, 5_MB);
b.InMemoryProcessingState = std::make_unique<TState>(MemInfo, KeyWidth, KeyAndStateType->GetElementsCount() - KeyWidth, Hasher, Equal);
}
SplitStateIntoBuckets();
break;
case EOperatingMode::ProcessSpilled:
}
case EOperatingMode::ProcessSpilled: {
MKQL_ENSURE(EOperatingMode::Spilling == Mode, "Internal logic error");
MKQL_ENSURE(SpilledBuckets.size() == SpilledBucketCount, "Internal logic error");
break;
}

}
Mode = mode;
Expand Down