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. /// 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: 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& col : in_header.getNames()) {
for (const auto& index_part : source_part->index_parts) { for (const auto& index_part : source_part->index_parts) {
const auto index_cols = index_part->index->sample.getNames(); const auto index_cols = index_part->index->sample.getNames();
@ -940,7 +941,7 @@ MergeTreeData::MutableDataPartPtr MergeTreeDataMergerMutator::mutatePartToTempor
if (it != cend(index_cols)) { if (it != cend(index_cols)) {
throw Exception("You can not modify columns used in index. Index name: '" throw Exception("You can not modify columns used in index. Index name: '"
+ index_part->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: public:
virtual ~IndexCondition() = default; virtual ~IndexCondition() = default;
virtual IndexType indexType() const; IndexType indexType() const;
/// Checks if this index is useful for query. /// Checks if this index is useful for query.
virtual bool alwaysUnknownOrTrue() const = 0; 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. /// Data structure for operations with index data for each MergeTreeDataPart.
/// Stores information specific for DataPart.
struct MergeTreeIndexPart struct MergeTreeIndexPart
{ {
friend MergeTreeIndex; friend MergeTreeIndex;
@ -66,7 +67,7 @@ public:
MergeTreeIndexPart() = default; MergeTreeIndexPart() = default;
virtual ~MergeTreeIndexPart() = default; virtual ~MergeTreeIndexPart() = default;
virtual IndexType indexType() const; IndexType indexType() const;
virtual MergeTreeIndexPartPtr cloneEmpty() const = 0; virtual MergeTreeIndexPartPtr cloneEmpty() const = 0;