better granularity computing

This commit is contained in:
CurtizJ 2019-12-28 00:32:55 +03:00
parent 74d5c6edc7
commit ccb15e6332
3 changed files with 4 additions and 4 deletions

View File

@ -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()

View File

@ -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

View File

@ -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.
*/