1 | #include <Dictionaries/ComplexKeyCacheDictionary.h> |
2 | |
3 | namespace DB |
4 | { |
5 | namespace ErrorCodes |
6 | { |
7 | extern const int TYPE_MISMATCH; |
8 | } |
9 | |
10 | using TYPE = UInt16; |
11 | |
12 | void ComplexKeyCacheDictionary::getUInt16(const std::string & attribute_name, |
13 | const Columns & key_columns, |
14 | const DataTypes & key_types, |
15 | const TYPE def, |
16 | ResultArrayType<TYPE> & out) const |
17 | { |
18 | dict_struct.validateKeyTypes(key_types); |
19 | |
20 | auto & attribute = getAttribute(attribute_name); |
21 | checkAttributeType(name, attribute_name, attribute.type, AttributeUnderlyingType::utUInt16); |
22 | |
23 | getItemsNumberImpl<TYPE, TYPE>(attribute, key_columns, out, [&](const size_t) { return def; }); |
24 | } |
25 | } |
26 | |