This commit is contained in:
Nikita Vasilev 2019-01-02 21:47:07 +03:00
parent f704a32515
commit b2da3a34df
2 changed files with 5 additions and 3 deletions

View File

@ -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);
}
}
}

View File

@ -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<IndexCondition>;
/// 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;