mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
Fixed tests
This commit is contained in:
parent
ff86c21e65
commit
41ef9291f1
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <Core/Defines.h>
|
#include <Core/Defines.h>
|
||||||
#include <Common/HashTable/HashMap.h>
|
#include <Common/HashTable/HashMap.h>
|
||||||
|
#include <Common/HashTable/HashSet.h>
|
||||||
|
|
||||||
#include <DataTypes/DataTypesDecimal.h>
|
#include <DataTypes/DataTypesDecimal.h>
|
||||||
#include <IO/WriteHelpers.h>
|
#include <IO/WriteHelpers.h>
|
||||||
@ -249,6 +250,8 @@ void FlatDictionary::blockToAttributes(const Block & block)
|
|||||||
DictionaryKeysExtractor<DictionaryKeyType::simple> keys_extractor({ keys_column }, arena_holder.getComplexKeyArena());
|
DictionaryKeysExtractor<DictionaryKeyType::simple> keys_extractor({ keys_column }, arena_holder.getComplexKeyArena());
|
||||||
auto keys = keys_extractor.extractAllKeys();
|
auto keys = keys_extractor.extractAllKeys();
|
||||||
|
|
||||||
|
HashSet<UInt64> already_processed_keys;
|
||||||
|
|
||||||
size_t key_offset = 1;
|
size_t key_offset = 1;
|
||||||
for (size_t attribute_index = 0; attribute_index < attributes.size(); ++attribute_index)
|
for (size_t attribute_index = 0; attribute_index < attributes.size(); ++attribute_index)
|
||||||
{
|
{
|
||||||
@ -259,12 +262,15 @@ void FlatDictionary::blockToAttributes(const Block & block)
|
|||||||
{
|
{
|
||||||
auto key = keys[i];
|
auto key = keys[i];
|
||||||
|
|
||||||
if (key < loaded_keys.size() && loaded_keys[key])
|
if (already_processed_keys.find(key) != nullptr)
|
||||||
continue;
|
continue;
|
||||||
|
already_processed_keys.insert(key);
|
||||||
|
|
||||||
setAttributeValue(attribute, key, attribute_column[i]);
|
setAttributeValue(attribute, key, attribute_column[i]);
|
||||||
++element_count;
|
++element_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
already_processed_keys.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user