| 448 | |
| 449 | template <DictionaryKeyType dictionary_key_type, bool sharded> |
| 450 | void HashedArrayDictionary<dictionary_key_type, sharded>::createAttributes() |
| 451 | { |
| 452 | const auto size = dict_struct.attributes.size(); |
| 453 | attributes.reserve(size); |
| 454 | |
| 455 | for (const auto & dictionary_attribute : dict_struct.attributes) |
| 456 | { |
| 457 | auto type_call = [&, this](const auto & dictionary_attribute_type) |
| 458 | { |
| 459 | using Type = std::decay_t<decltype(dictionary_attribute_type)>; |
| 460 | using AttributeType = typename Type::AttributeType; |
| 461 | using ValueType = DictionaryValueType<AttributeType>; |
| 462 | |
| 463 | auto is_index_null = dictionary_attribute.is_nullable ? std::make_optional<VectorWithMemoryTracking<typename Attribute::RowsMask>>(configuration.shards) : std::nullopt; |
| 464 | Attribute attribute{ |
| 465 | .containers = AttributeContainerShardsType<ValueType>(configuration.shards), |
| 466 | .is_index_null = std::move(is_index_null), |
| 467 | .type = dictionary_attribute.underlying_type}; |
| 468 | attributes.emplace_back(std::move(attribute)); |
| 469 | }; |
| 470 | |
| 471 | callOnDictionaryAttributeType(dictionary_attribute.underlying_type, type_call); |
| 472 | } |
| 473 | |
| 474 | key_attribute.containers.resize(configuration.shards); |
| 475 | element_counts.resize(configuration.shards); |
| 476 | |
| 477 | string_arenas.resize(configuration.shards); |
| 478 | for (auto & arena : string_arenas) |
| 479 | arena = std::make_unique<Arena>(); |
| 480 | } |
| 481 | |
| 482 | template <DictionaryKeyType dictionary_key_type, bool sharded> |
| 483 | void HashedArrayDictionary<dictionary_key_type, sharded>::updateData() |
nothing calls this directly
no test coverage detected