mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
Fix totals.
This commit is contained in:
parent
355c16eb79
commit
e8dbf94807
@ -34,19 +34,23 @@ IProcessor::Status SourceFromInputStream::prepare()
|
||||
if (!is_stream_finished)
|
||||
return Status::Ready;
|
||||
|
||||
if (has_totals_port && has_totals)
|
||||
if (has_totals_port)
|
||||
{
|
||||
auto & totals_out = outputs.back();
|
||||
|
||||
if (totals_out.isFinished())
|
||||
return Status::Finished;
|
||||
|
||||
if (!totals_out.canPush())
|
||||
return Status::PortFull;
|
||||
if (has_totals)
|
||||
{
|
||||
if (!totals_out.canPush())
|
||||
return Status::PortFull;
|
||||
|
||||
totals_out.push(std::move(totals));
|
||||
has_totals = false;
|
||||
}
|
||||
|
||||
totals_out.push(std::move(totals));
|
||||
totals_out.finish();
|
||||
has_totals = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user