mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
work with review notes
This commit is contained in:
parent
0d1a8cac98
commit
0dfcaaa28f
@ -18,7 +18,6 @@ Squashing::Squashing(Block header_, size_t min_block_size_rows_, size_t min_bloc
|
||||
, min_block_size_bytes(min_block_size_bytes_)
|
||||
, header(header_)
|
||||
{
|
||||
LOG_TEST(getLogger("Squashing"), "header columns {}", header.columns());
|
||||
}
|
||||
|
||||
Chunk Squashing::flush()
|
||||
@ -46,8 +45,6 @@ Chunk Squashing::squash(Chunk && input_chunk)
|
||||
|
||||
Chunk Squashing::add(Chunk && input_chunk)
|
||||
{
|
||||
LOG_TEST(getLogger("Squashing"), "add columns {} rows {}", input_chunk.getNumColumns(), input_chunk.getNumRows());
|
||||
|
||||
if (!input_chunk)
|
||||
return {};
|
||||
|
||||
@ -88,8 +85,6 @@ Chunk Squashing::add(Chunk && input_chunk)
|
||||
|
||||
Chunk Squashing::convertToChunk(CurrentData && data) const
|
||||
{
|
||||
LOG_TEST(getLogger("Squashing"), "convertToChunk {}", data.chunks.size());
|
||||
|
||||
if (data.chunks.empty())
|
||||
return {};
|
||||
|
||||
@ -99,7 +94,10 @@ Chunk Squashing::convertToChunk(CurrentData && data) const
|
||||
// It is imortant that chunk is not empty, it has to have columns even if they are empty
|
||||
// Sometimes there are could be no columns in header but not empty rows in chunks
|
||||
// That happens when we intend to add defaults for the missing columns after
|
||||
auto aggr_chunk = Chunk(header.getColumns(), header.columns() ? 0 : data.getRows());
|
||||
auto aggr_chunk = Chunk(header.getColumns(), 0);
|
||||
if (header.columns() == 0)
|
||||
aggr_chunk = Chunk(header.getColumns(), data.getRows());
|
||||
|
||||
aggr_chunk.getChunkInfos().add(std::move(info));
|
||||
chassert(aggr_chunk);
|
||||
return aggr_chunk;
|
||||
|
Loading…
Reference in New Issue
Block a user