diff --git a/src/Interpreters/Set.cpp b/src/Interpreters/Set.cpp index f331f3cecb3..9f7d0606e4b 100644 --- a/src/Interpreters/Set.cpp +++ b/src/Interpreters/Set.cpp @@ -473,18 +473,9 @@ MergeTreeSetIndex::MergeTreeSetIndex(const Columns & set_elements, std::vectorcloneEmpty()); - right_point.emplace_back(ordered_set[i]->cloneEmpty()); - } - Block block_to_sort; SortDescription sort_description; for (size_t i = 0; i < tuple_size; ++i) @@ -504,10 +495,19 @@ MergeTreeSetIndex::MergeTreeSetIndex(const Columns & set_elements, std::vector & key_ranges, const DataTypes & data_types) +BoolMask MergeTreeSetIndex::checkInRange(const std::vector & key_ranges, const DataTypes & data_types) const { size_t tuple_size = indexes_mapping.size(); + ColumnsWithInfinity left_point(tuple_size); + ColumnsWithInfinity right_point(tuple_size); + + for (size_t i = 0; i < tuple_size; ++i) + { + left_point.emplace_back(ordered_set[i]->cloneEmpty()); + right_point.emplace_back(ordered_set[i]->cloneEmpty()); + } + bool invert_left_infinities = false; bool invert_right_infinities = false; diff --git a/src/Interpreters/Set.h b/src/Interpreters/Set.h index 933bace5e45..4df89831896 100644 --- a/src/Interpreters/Set.h +++ b/src/Interpreters/Set.h @@ -234,16 +234,13 @@ public: bool hasMonotonicFunctionsChain() const; - BoolMask checkInRange(const std::vector & key_ranges, const DataTypes & data_types); + BoolMask checkInRange(const std::vector & key_ranges, const DataTypes & data_types) const; private: Columns ordered_set; std::vector indexes_mapping; using ColumnsWithInfinity = std::vector; - - ColumnsWithInfinity left_point; - ColumnsWithInfinity right_point; }; }