Skip to content

Commit ca5327a

Browse files
nepalGrigoriyPA
authored andcommitted
Fix erroneous finish on TDqInputMergeBlockStreamValue (ydb-platform#8834)
1 parent 5a651e6 commit ca5327a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ydb/library/yql/dq/runtime/dq_input_producer.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,10 @@ class TDqInputMergeBlockStreamValue : public TComputationValue<TDqInputMergeBloc
432432
return CurrBlockIndex_ >= BlockLen_;
433433
}
434434

435+
bool IsFinished() const {
436+
return IsFinished_;
437+
}
438+
435439
void NextRow() {
436440
Y_DEBUG_ABORT_UNLESS(!IsEmpty());
437441
++CurrBlockIndex_;
@@ -644,7 +648,7 @@ class TDqInputMergeBlockStreamValue : public TComputationValue<TDqInputMergeBloc
644648
input.NextRow();
645649
InputRows_.pop_back();
646650
if (input.IsEmpty()) {
647-
auto status = input.FetchNext();
651+
auto status = FetchInput(inputIndex);
648652
if (status == NUdf::EFetchStatus::Yield) {
649653
StartInputIndex_ = inputIndex;
650654
return status;
@@ -656,6 +660,7 @@ class TDqInputMergeBlockStreamValue : public TComputationValue<TDqInputMergeBloc
656660
}
657661

658662
if (!OutputBlockLen_) {
663+
YQL_ENSURE(AllOf(InputData_, [](const TDqInputBatch& input) { return input.IsEmpty() && input.IsFinished(); }));
659664
return NUdf::EFetchStatus::Finish;
660665
}
661666

0 commit comments

Comments
 (0)