MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / getColumn

Method getColumn

src/Dictionaries/HashedArrayDictionary.cpp:58–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57template <DictionaryKeyType dictionary_key_type, bool sharded>
58ColumnPtr HashedArrayDictionary<dictionary_key_type, sharded>::getColumn(
59 const std::string & attribute_name,
60 const DataTypePtr & attribute_type,
61 const Columns & key_columns,
62 const DataTypes & key_types,
63 DefaultOrFilter default_or_filter) const
64{
65 if (dictionary_key_type == DictionaryKeyType::Complex)
66 dict_struct.validateKeyTypes(key_types);
67
68 ColumnPtr result;
69
70 DictionaryKeysArenaHolder<dictionary_key_type> arena_holder;
71 DictionaryKeysExtractor<dictionary_key_type> extractor(key_columns, arena_holder.getComplexKeyArena());
72
73 const size_t keys_size = extractor.getKeysSize();
74
75 const auto & dictionary_attribute = dict_struct.getAttribute(attribute_name, attribute_type);
76 const size_t attribute_index = dict_struct.attribute_name_to_index.find(attribute_name)->second;
77 auto & attribute = attributes[attribute_index];
78
79 return getAttributeColumn(attribute, dictionary_attribute, keys_size, default_or_filter, extractor);
80}
81
82template <DictionaryKeyType dictionary_key_type, bool sharded>
83Columns HashedArrayDictionary<dictionary_key_type, sharded>::getColumns(

Callers

nothing calls this directly

Calls 4

validateKeyTypesMethod · 0.80
getComplexKeyArenaMethod · 0.45
getKeysSizeMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected