Do not generate empty chunks in AggregatingInOrderTransform

This is just a micro optimization and it should not affect anything,
real fixes are in separate patches (previous and next).

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2022-01-14 16:49:04 +03:00
parent d9a64d1f86
commit 06402386eb

View File

@ -255,6 +255,8 @@ void AggregatingInOrderTransform::generate()
res.getByPosition(i + res_key_columns.size()).column = std::move(res_aggregate_columns[i]);
to_push_chunk = convertToChunk(res);
if (!to_push_chunk.getNumRows())
return;
/// Clear arenas to allow to free them, when chunk will reach the end of pipeline.
/// It's safe clear them here, because columns with aggregate functions already holds them.