Skip to content

Commit 4782b8a

Browse files
authored
Fix erroneous finish on TDqInputMergeBlockStreamValue (#8834)
1 parent f464fbb commit 4782b8a

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,10 @@ class TDqInputMergeBlockStreamValue : public TComputationValue<TDqInputMergeBloc
421421
return CurrBlockIndex_ >= BlockLen_;
422422
}
423423

424+
bool IsFinished() const {
425+
return IsFinished_;
426+
}
427+
424428
void NextRow() {
425429
Y_DEBUG_ABORT_UNLESS(!IsEmpty());
426430
++CurrBlockIndex_;
@@ -633,7 +637,7 @@ class TDqInputMergeBlockStreamValue : public TComputationValue<TDqInputMergeBloc
633637
input.NextRow();
634638
InputRows_.pop_back();
635639
if (input.IsEmpty()) {
636-
auto status = input.FetchNext();
640+
auto status = FetchInput(inputIndex);
637641
if (status == NUdf::EFetchStatus::Yield) {
638642
StartInputIndex_ = inputIndex;
639643
return status;
@@ -645,6 +649,7 @@ class TDqInputMergeBlockStreamValue : public TComputationValue<TDqInputMergeBloc
645649
}
646650

647651
if (!OutputBlockLen_) {
652+
YQL_ENSURE(AllOf(InputData_, [](const TDqInputBatch& input) { return input.IsEmpty() && input.IsFinished(); }));
648653
return NUdf::EFetchStatus::Finish;
649654
}
650655

0 commit comments

Comments
 (0)