Skip to content

Commit 675ef54

Browse files
committed
Cleanup code
1 parent efa24d9 commit 675ef54

File tree

1 file changed

+0
-105
lines changed

1 file changed

+0
-105
lines changed

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

Lines changed: 0 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -400,32 +400,6 @@ using TBase = TComputationValue<TSpillingSupportState<Sort, HasCount>>;
400400
}
401401
}
402402

403-
// virtual EFetchResult DoCalculate(TComputationContext& ctx, NUdf::TUnboxedValue*const* output) {
404-
// while (true) {
405-
// switch(GetMode()) {
406-
// case EOperatingMode::InMemory: {
407-
// auto r = DoCalculateInMemory(ctx, output);
408-
// if (GetMode() == TSpillingSupportState::EOperatingMode::InMemory) {
409-
// return r;
410-
// }
411-
// break;
412-
// }
413-
// case EOperatingMode::Spilling: {
414-
// DoCalculateWithSpilling(ctx);
415-
// if (GetMode() == EOperatingMode::Spilling) {
416-
// return EFetchResult::Yield;
417-
// }
418-
// break;
419-
// }
420-
// case EOperatingMode::ProcessSpilled: {
421-
// return ProcessSpilledData(output);
422-
// }
423-
424-
// }
425-
// }
426-
// Y_UNREACHABLE();
427-
// }
428-
429403
bool IsReadyToContinue() {
430404
switch (GetMode()) {
431405
case EOperatingMode::InMemory:
@@ -463,85 +437,6 @@ using TBase = TComputationValue<TSpillingSupportState<Sort, HasCount>>;
463437
return Fields.data();
464438
}
465439

466-
// EFetchResult DoCalculateInMemory(TComputationContext& , NUdf::TUnboxedValue*const* ) {
467-
// case EFetchResult::One:
468-
// if (Put()) {
469-
// if (ctx.SpillerFactory && !HasMemoryForProcessing()) {
470-
// SwitchMode(EOperatingMode::Spilling);
471-
// return EFetchResult::Yield;
472-
// }
473-
// }
474-
// continue;
475-
// case EFetchResult::Yield:
476-
// return EFetchResult::Yield;
477-
// case EFetchResult::Finish:
478-
// {
479-
// if (!SpilledStates.empty()) {
480-
// SwitchMode(EOperatingMode::Spilling);
481-
// return EFetchResult::Yield;
482-
// }
483-
// Seal();
484-
// break;
485-
// }
486-
// }
487-
// }
488-
489-
// if (auto extract = Extract()) {
490-
// for (const auto index : Indexes)
491-
// if (const auto to = output[index])
492-
// *to = std::move(*extract++);
493-
// else
494-
// ++extract;
495-
// return EFetchResult::One;
496-
// }
497-
498-
// return EFetchResult::Finish;
499-
// }
500-
501-
// EFetchResult DoCalculateWithSpilling(TComputationContext& ctx) {
502-
// if (!SpillState()) {
503-
// return EFetchResult::Yield;
504-
// }
505-
// ResetFields();
506-
// auto nextMode = (IsReadFromChannelFinished() ? EOperatingMode::ProcessSpilled : EOperatingMode::InMemory);
507-
// SwitchMode(nextMode);
508-
// return EFetchResult::Yield;
509-
// }
510-
511-
// EFetchResult ProcessSpilledData(NUdf::TUnboxedValue*const* output) {
512-
// if (SpilledUnboxedValuesIterators.empty()) {
513-
// return EFetchResult::Finish;
514-
// }
515-
516-
// for (auto &spilledUnboxedValuesIterator : SpilledUnboxedValuesIterators) {
517-
// if (!spilledUnboxedValuesIterator.CheckForInit()) {
518-
// return EFetchResult::Yield;
519-
// }
520-
// }
521-
// if (!IsHeapBuilt) {
522-
// std::make_heap(SpilledUnboxedValuesIterators.begin(), SpilledUnboxedValuesIterators.end());
523-
// IsHeapBuilt = true;
524-
// } else {
525-
// std::push_heap(SpilledUnboxedValuesIterators.begin(), SpilledUnboxedValuesIterators.end());
526-
// }
527-
528-
// std::pop_heap(SpilledUnboxedValuesIterators.begin(), SpilledUnboxedValuesIterators.end());
529-
// auto &currentIt = SpilledUnboxedValuesIterators.back();
530-
// NKikimr::NUdf::TUnboxedValue* res = currentIt.GetValue();
531-
// for (const auto index : Indexes)
532-
// {
533-
// if (const auto to = output[index])
534-
// *to = std::move(*res++);
535-
// else
536-
// ++res;
537-
// }
538-
// currentIt.Pop();
539-
// if (currentIt.IsFinished()) {
540-
// SpilledUnboxedValuesIterators.pop_back();
541-
// }
542-
// return EFetchResult::One;
543-
// }
544-
545440
void Put() {
546441
if constexpr (!HasCount) {
547442
ResetFields();

0 commit comments

Comments
 (0)