mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +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())
|
||||
{
|
||||
totals.setColumns(totals_block.getColumns(), 1);
|
||||
has_totals = true;
|
||||
if (totals_block.rows() == 1) /// Sometimes we can get empty totals. Skip it.
|
||||
{
|
||||
totals.setColumns(totals_block.getColumns(), 1);
|
||||
has_totals = true;
|
||||
}
|
||||
}
|
||||
|
||||
is_stream_finished = true;
|
||||
|
Loading…
Reference in New Issue
Block a user