mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 11:22:12 +00:00
Improve naming
This commit is contained in:
parent
8b77b706c4
commit
d2dc5e9fc8
@ -45,14 +45,14 @@ Key getPartialKey(std::string_view key, const PartialKeyPositions & partial_key_
|
|||||||
|
|
||||||
bool allPartialKeysAreUnique(const std::vector<Key> & data, const PartialKeyPositions & partial_key_positions)
|
bool allPartialKeysAreUnique(const std::vector<Key> & data, const PartialKeyPositions & partial_key_positions)
|
||||||
{
|
{
|
||||||
std::unordered_set<Key> partial_keys;
|
std::unordered_set<Key> unique_partial_keys;
|
||||||
partial_keys.reserve(data.size());
|
unique_partial_keys.reserve(data.size());
|
||||||
Key partial_key;
|
Key partial_key;
|
||||||
|
|
||||||
for (const auto & key : data)
|
for (const auto & key : data)
|
||||||
{
|
{
|
||||||
getPartialKey(key, partial_key_positions, partial_key);
|
getPartialKey(key, partial_key_positions, partial_key);
|
||||||
if (!partial_keys.insert(partial_key).second)
|
if (!unique_partial_keys.insert(partial_key).second)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user