Skip to content

Commit

Permalink
Merge 82ae5b4 into 4b411f4
Browse files Browse the repository at this point in the history
  • Loading branch information
lll-phill-lll authored May 21, 2024
2 parents 4b411f4 + 82ae5b4 commit d47dc80
Showing 1 changed file with 7 additions and 4 deletions.
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

0 comments on commit d47dc80

Please sign in to comment.