mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
dbms: fixed error [#METR-17536].
This commit is contained in:
parent
2318e27485
commit
9e8b28131e
@ -100,9 +100,9 @@ public:
|
|||||||
arenas.push_back(arena_);
|
arenas.push_back(arena_);
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnPtr convertToValues()
|
ColumnPtr convertToValues() const
|
||||||
{
|
{
|
||||||
IAggregateFunction * function = holder->func;
|
const IAggregateFunction * function = holder->func;
|
||||||
ColumnPtr res = function->getReturnType()->createColumn();
|
ColumnPtr res = function->getReturnType()->createColumn();
|
||||||
IColumn & column = *res;
|
IColumn & column = *res;
|
||||||
res->reserve(getData().size());
|
res->reserve(getData().size());
|
||||||
|
@ -1756,7 +1756,7 @@ Block Aggregator::mergeBlocks(BlocksList & blocks, bool final)
|
|||||||
|
|
||||||
for (const auto & block : merged_blocks)
|
for (const auto & block : merged_blocks)
|
||||||
{
|
{
|
||||||
if (block && !block.info.is_overflows)
|
if (block && block.rowsInFirstColumn() && !block.info.is_overflows)
|
||||||
has_nonempty_nonoverflows = true;
|
has_nonempty_nonoverflows = true;
|
||||||
else if (block.info.is_overflows)
|
else if (block.info.is_overflows)
|
||||||
has_overflows = true;
|
has_overflows = true;
|
||||||
@ -1777,7 +1777,7 @@ Block Aggregator::mergeBlocks(BlocksList & blocks, bool final)
|
|||||||
{
|
{
|
||||||
for (auto it = merged_blocks.begin(); it != merged_blocks.end(); ++it)
|
for (auto it = merged_blocks.begin(); it != merged_blocks.end(); ++it)
|
||||||
{
|
{
|
||||||
if (!*it)
|
if (!*it || it->rowsInFirstColumn() == 0)
|
||||||
{
|
{
|
||||||
merged_blocks.erase(it);
|
merged_blocks.erase(it);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user