diff --git a/src/Columns/ColumnDecimal.cpp b/src/Columns/ColumnDecimal.cpp index e4790c493a2..69e22430984 100644 --- a/src/Columns/ColumnDecimal.cpp +++ b/src/Columns/ColumnDecimal.cpp @@ -270,14 +270,11 @@ size_t ColumnDecimal::estimateNumberOfDifferent(const IColumn::Permutation & { // TODO: sample random elements size_t range_size = getRangeSize(range); - if (range_size <= 1ULL) { + if (range_size <= 1ULL) return range_size; - } HashSet elements; for (size_t i = range.first; i < range.second; ++i) - { elements.insert(data[perm[i]]); - } return elements.size(); }