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