diff --git a/dbms/src/Storages/MergeTree/IMergeTreeDataPartWriter.cpp b/dbms/src/Storages/MergeTree/IMergeTreeDataPartWriter.cpp index 60ce5b6b947..c369430b954 100644 --- a/dbms/src/Storages/MergeTree/IMergeTreeDataPartWriter.cpp +++ b/dbms/src/Storages/MergeTree/IMergeTreeDataPartWriter.cpp @@ -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() diff --git a/dbms/src/Storages/MergeTree/MergeTreeDataPartWriterCompact.cpp b/dbms/src/Storages/MergeTree/MergeTreeDataPartWriterCompact.cpp index 7896c0e1c61..d157d19baa4 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeDataPartWriterCompact.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeDataPartWriterCompact.cpp @@ -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 diff --git a/dbms/src/Storages/MergeTree/MergeTreeDataPartWriterCompact.h b/dbms/src/Storages/MergeTree/MergeTreeDataPartWriterCompact.h index f2e9503c8bb..8cefde6cac9 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeDataPartWriterCompact.h +++ b/dbms/src/Storages/MergeTree/MergeTreeDataPartWriterCompact.h @@ -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. */