Merge pull request #64285 from ClickHouse/vdimir/squashing_transform_followup

Followup for #63691
This commit is contained in:
Alexey Milovidov 2024-05-24 04:32:08 +02:00 committed by GitHub
commit 6c06772e5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,7 +71,9 @@ Chunk SimpleSquashingChunksTransform::generate()
if (squashed_chunk.empty())
throw Exception(ErrorCodes::LOGICAL_ERROR, "Can't generate chunk in SimpleSquashingChunksTransform");
return std::move(squashed_chunk);
Chunk result_chunk;
result_chunk.swap(squashed_chunk);
return result_chunk;
}
bool SimpleSquashingChunksTransform::canGenerate()
@ -83,7 +85,10 @@ Chunk SimpleSquashingChunksTransform::getRemaining()
{
Block current_block = squashing.add({});
squashed_chunk.setColumns(current_block.getColumns(), current_block.rows());
return std::move(squashed_chunk);
Chunk result_chunk;
result_chunk.swap(squashed_chunk);
return result_chunk;
}
}