From b2da3a34df6f3a596e83217c8b3d3d3c2fcc308b Mon Sep 17 00:00:00 2001 From: Nikita Vasilev Date: Wed, 2 Jan 2019 21:47:07 +0300 Subject: [PATCH] comments --- dbms/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp | 3 ++- dbms/src/Storages/MergeTree/MergeTreeIndexes.h | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dbms/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp b/dbms/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp index ef2d56a4f83..014977f8bc3 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp +++ b/dbms/src/Storages/MergeTree/MergeTreeDataMergerMutator.cpp @@ -933,6 +933,7 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mutatePartToTempor /// We will modify only some of the columns. Other columns and key values can be copied as-is. /// TODO: check that we modify only non-key columns in this case. + /// TODO: just recalc index on part for (const auto& col : in_header.getNames()) { for (const auto& index_part : source_part->index_parts) { const auto index_cols = index_part->index->sample.getNames(); @@ -940,7 +941,7 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mutatePartToTempor if (it != cend(index_cols)) { throw Exception("You can not modify columns used in index. Index name: '" + index_part->index->name - + "' bad column:" + *it, ErrorCodes::ILLEGAL_COLUMN); + + "' bad column: '" + *it + "'", ErrorCodes::ILLEGAL_COLUMN); } } } diff --git a/dbms/src/Storages/MergeTree/MergeTreeIndexes.h b/dbms/src/Storages/MergeTree/MergeTreeIndexes.h index a20bc2f7b28..44685c3d914 100644 --- a/dbms/src/Storages/MergeTree/MergeTreeIndexes.h +++ b/dbms/src/Storages/MergeTree/MergeTreeIndexes.h @@ -39,7 +39,7 @@ class IndexCondition { public: virtual ~IndexCondition() = default; - virtual IndexType indexType() const; + IndexType indexType() const; /// Checks if this index is useful for query. virtual bool alwaysUnknownOrTrue() const = 0; @@ -58,6 +58,7 @@ using IndexConditionPtr = std::shared_ptr; /// Data structure for operations with index data for each MergeTreeDataPart. +/// Stores information specific for DataPart. struct MergeTreeIndexPart { friend MergeTreeIndex; @@ -66,7 +67,7 @@ public: MergeTreeIndexPart() = default; virtual ~MergeTreeIndexPart() = default; - virtual IndexType indexType() const; + IndexType indexType() const; virtual MergeTreeIndexPartPtr cloneEmpty() const = 0;