mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
better granularity computing
This commit is contained in:
parent
74d5c6edc7
commit
ccb15e6332
@ -130,7 +130,7 @@ static void fillIndexGranularityImpl(
|
||||
for (current_row = index_offset; current_row < rows_in_block; current_row += index_granularity_for_block)
|
||||
{
|
||||
size_t rows_left_in_block = rows_in_block - current_row;
|
||||
|
||||
|
||||
/// FIXME need comment
|
||||
if (need_finish_last_granule && rows_left_in_block < index_granularity_for_block
|
||||
&& (rows_in_block >= index_granularity_for_block || index_offset != 0))
|
||||
@ -160,7 +160,7 @@ void IMergeTreeDataPartWriter::fillIndexGranularity(const Block & block)
|
||||
index_offset,
|
||||
index_granularity,
|
||||
settings.can_use_adaptive_granularity,
|
||||
need_finish_last_granule && index_offset != 0);
|
||||
need_finish_last_granule);
|
||||
}
|
||||
|
||||
void IMergeTreeDataPartWriter::initPrimaryIndex()
|
||||
|
@ -75,7 +75,7 @@ void MergeTreeDataPartWriterCompact::write(
|
||||
columns_buffer.add(result_block.mutateColumns());
|
||||
size_t last_mark_rows = index_granularity.getLastMarkRows();
|
||||
size_t rows_in_buffer = columns_buffer.size();
|
||||
|
||||
|
||||
if (rows_in_buffer < last_mark_rows)
|
||||
{
|
||||
/// FIXME need comment
|
||||
|
@ -35,7 +35,7 @@ private:
|
||||
|
||||
Block header;
|
||||
|
||||
/** Simplified SquashingTransform. The original one isn't suitable in this case
|
||||
/** Simplified SquashingTransform. The original one isn't suitable in this case
|
||||
* as it can return smaller block from buffer without merging it with larger block if last is enough size.
|
||||
* But in compact parts we should guarantee, that written block is larger or equals than index_granularity.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user