mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Skip empty totals in SourceFromInputStream.
This commit is contained in:
parent
abccddb6b9
commit
a0e9f9fdcf
@ -115,8 +115,11 @@ Chunk SourceFromInputStream::generate()
|
|||||||
|
|
||||||
if (auto totals_block = stream->getTotals())
|
if (auto totals_block = stream->getTotals())
|
||||||
{
|
{
|
||||||
totals.setColumns(totals_block.getColumns(), 1);
|
if (totals_block.rows() == 1) /// Sometimes we can get empty totals. Skip it.
|
||||||
has_totals = true;
|
{
|
||||||
|
totals.setColumns(totals_block.getColumns(), 1);
|
||||||
|
has_totals = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
is_stream_finished = true;
|
is_stream_finished = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user