ClickHouse/dbms/Dictionaries/CacheDictionary_generate3.cpp.in

21 lines
589 B
C++
Raw Normal View History

#include <Dictionaries/CacheDictionary.h>
#include <Dictionaries/CacheDictionary.inc.h>
namespace DB
{
namespace ErrorCodes
{
extern const int TYPE_MISMATCH;
}
using TYPE = @NAME@;
void CacheDictionary::get@NAME@(const std::string & attribute_name, const PaddedPODArray<Key> & ids, const TYPE def, ResultArrayType<TYPE> & out) const
{
auto & attribute = getAttribute(attribute_name);
2019-08-03 11:02:40 +00:00
checkAttributeType(name, attribute_name, attribute.type, AttributeUnderlyingType::ut@NAME@);
getItemsNumberImpl<TYPE, TYPE>(attribute, ids, out, [&](const size_t) { return def; });
}
}