mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Merge pull request #4851 from yandex/remove-assume-mutable-1
Removed "assumeMutable" usage in one case
This commit is contained in:
commit
4c9ad05781
@ -216,7 +216,7 @@ protected:
|
|||||||
chameleon_ptr(std::initializer_list<U> && arg) : value(std::forward<std::initializer_list<U>>(arg)) {}
|
chameleon_ptr(std::initializer_list<U> && arg) : value(std::forward<std::initializer_list<U>>(arg)) {}
|
||||||
|
|
||||||
const T * get() const { return value.get(); }
|
const T * get() const { return value.get(); }
|
||||||
T * get() { return value->assumeMutable().get(); }
|
T * get() { return &value->assumeMutableRef(); }
|
||||||
|
|
||||||
const T * operator->() const { return get(); }
|
const T * operator->() const { return get(); }
|
||||||
T * operator->() { return get(); }
|
T * operator->() { return get(); }
|
||||||
|
@ -197,7 +197,7 @@ bool Set::insertFromBlock(const Block & block)
|
|||||||
if (set_elements[i]->empty())
|
if (set_elements[i]->empty())
|
||||||
set_elements[i] = filtered_column;
|
set_elements[i] = filtered_column;
|
||||||
else
|
else
|
||||||
set_elements[i]->assumeMutableRef().insertRangeFrom(*filtered_column, 0, filtered_column->size());
|
set_elements[i]->insertRangeFrom(*filtered_column, 0, filtered_column->size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ public:
|
|||||||
const DataTypes & getDataTypes() const { return data_types; }
|
const DataTypes & getDataTypes() const { return data_types; }
|
||||||
|
|
||||||
bool hasExplicitSetElements() const { return fill_set_elements; }
|
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:
|
private:
|
||||||
size_t keys_size = 0;
|
size_t keys_size = 0;
|
||||||
@ -113,7 +113,7 @@ private:
|
|||||||
|
|
||||||
/// Collected elements of `Set`.
|
/// Collected elements of `Set`.
|
||||||
/// It is necessary for the index to work on the primary key in the IN statement.
|
/// 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`.
|
/** Protects work with the set in the functions `insertFromBlock` and `execute`.
|
||||||
* These functions can be called simultaneously from different threads only when using StorageSet,
|
* These functions can be called simultaneously from different threads only when using StorageSet,
|
||||||
|
@ -457,7 +457,7 @@ bool BloomFilterCondition::tryPrepareSetBloomFilter(
|
|||||||
std::vector<std::vector<StringBloomFilter>> bloom_filters;
|
std::vector<std::vector<StringBloomFilter>> bloom_filters;
|
||||||
std::vector<size_t> key_position;
|
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)
|
for (size_t col = 0; col < key_tuple_mapping.size(); ++col)
|
||||||
{
|
{
|
||||||
bloom_filters.emplace_back();
|
bloom_filters.emplace_back();
|
||||||
|
Loading…
Reference in New Issue
Block a user