Merge pull request #4851 from yandex/remove-assume-mutable-1

Removed "assumeMutable" usage in one case
This commit is contained in:
alexey-milovidov 2019-03-29 18:34:03 +03:00 committed by GitHub
commit 4c9ad05781
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -216,7 +216,7 @@ protected:
chameleon_ptr(std::initializer_list<U> && arg) : value(std::forward<std::initializer_list<U>>(arg)) {}
const T * get() const { return value.get(); }
T * get() { return value->assumeMutable().get(); }
T * get() { return &value->assumeMutableRef(); }
const T * operator->() const { return get(); }
T * operator->() { return get(); }

View File

@ -197,7 +197,7 @@ bool Set::insertFromBlock(const Block & block)
if (set_elements[i]->empty())
set_elements[i] = filtered_column;
else
set_elements[i]->assumeMutableRef().insertRangeFrom(*filtered_column, 0, filtered_column->size());
set_elements[i]->insertRangeFrom(*filtered_column, 0, filtered_column->size());
}
}

View File

@ -68,7 +68,7 @@ public:
const DataTypes & getDataTypes() const { return data_types; }
bool hasExplicitSetElements() const { return fill_set_elements; }
const Columns & getSetElements() const { return set_elements; }
Columns getSetElements() const { return { set_elements.begin(), set_elements.end() }; }
private:
size_t keys_size = 0;
@ -113,7 +113,7 @@ private:
/// Collected elements of `Set`.
/// It is necessary for the index to work on the primary key in the IN statement.
Columns set_elements;
std::vector<IColumn::WrappedPtr> set_elements;
/** Protects work with the set in the functions `insertFromBlock` and `execute`.
* These functions can be called simultaneously from different threads only when using StorageSet,

View File

@ -457,7 +457,7 @@ bool BloomFilterCondition::tryPrepareSetBloomFilter(
std::vector<std::vector<StringBloomFilter>> bloom_filters;
std::vector<size_t> key_position;
const auto & columns = prepared_set->getSetElements();
Columns columns = prepared_set->getSetElements();
for (size_t col = 0; col < key_tuple_mapping.size(); ++col)
{
bloom_filters.emplace_back();