mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
add ClearableHashSetWithSavedHash
This commit is contained in:
parent
6801046eb9
commit
ad79394799
@ -68,3 +68,23 @@ public:
|
||||
this->m_size = 0;
|
||||
}
|
||||
};
|
||||
|
||||
template
|
||||
<
|
||||
typename Key,
|
||||
typename Hash = DefaultHash<Key>,
|
||||
typename Grower = HashTableGrower<>,
|
||||
typename Allocator = HashTableAllocator
|
||||
>
|
||||
class ClearableHashSetWithSavedHash: public HashTable<Key, ClearableHashTableCell<Key, HashSetCellWithSavedHash<Key, Hash, ClearableHashSetState>>, Hash, Grower, Allocator>
|
||||
{
|
||||
public:
|
||||
using key_type = Key;
|
||||
using value_type = typename ClearableHashSetWithSavedHash::cell_type::value_type;
|
||||
|
||||
void clear()
|
||||
{
|
||||
++this->version;
|
||||
this->m_size = 0;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user