mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Fix aggregator when data is empty
This commit is contained in:
parent
a1c08b256a
commit
9bf50ac814
@ -1867,7 +1867,12 @@ Aggregator::convertToBlockImpl(Method & method, Table & data, Arena * arena, Are
|
||||
if (data.empty())
|
||||
{
|
||||
auto && out_cols = prepareOutputBlockColumns(params, aggregate_functions, getHeader(final), aggregates_pools, final, rows);
|
||||
return {finalizeBlock(params, getHeader(final), std::move(out_cols), final, rows)};
|
||||
auto finalized_block = finalizeBlock(params, getHeader(final), std::move(out_cols), final, rows);
|
||||
|
||||
if (return_single_block)
|
||||
return std::move(finalized_block);
|
||||
|
||||
return BlocksList{std::move(finalized_block)};
|
||||
}
|
||||
ConvertToBlockResVariant res;
|
||||
bool use_compiled_functions = false;
|
||||
|
@ -0,0 +1,3 @@
|
||||
CREATE TABLE 03015_aggregator_empty_data_multiple_blocks (c0 Int32) ENGINE = Memory();
|
||||
INSERT INTO 03015_aggregator_empty_data_multiple_blocks SELECT * FROM generateRandom() LIMIT 1000;
|
||||
SELECT radians(t1.c0) FROM 03015_aggregator_empty_data_multiple_blocks AS t1 RIGHT ANTI JOIN 03015_aggregator_empty_data_multiple_blocks AS right_0 ON t1.c0=right_0.c0 GROUP BY t1.c0;
|
Loading…
Reference in New Issue
Block a user