UUID in dictionaries

This commit is contained in:
Alexey Milovidov 2021-05-10 00:02:08 +03:00
parent 49e4a43300
commit 11ba22b43f

View File

@ -243,13 +243,19 @@ public:
{ {
return ColumnType::create(); return ColumnType::create();
} }
if constexpr (IsDecimalNumber<DictionaryAttributeType>) else if constexpr (std::is_same_v<DictionaryAttributeType, UUID>)
{
return ColumnType::create(size);
}
else if constexpr (IsDecimalNumber<DictionaryAttributeType>)
{ {
auto scale = getDecimalScale(*dictionary_attribute.nested_type); auto scale = getDecimalScale(*dictionary_attribute.nested_type);
return ColumnType::create(size, scale); return ColumnType::create(size, scale);
} }
else if constexpr (IsNumber<DictionaryAttributeType>) else if constexpr (IsNumber<DictionaryAttributeType>)
{
return ColumnType::create(size); return ColumnType::create(size);
}
else else
throw Exception(ErrorCodes::TYPE_MISMATCH, "Unsupported attribute type."); throw Exception(ErrorCodes::TYPE_MISMATCH, "Unsupported attribute type.");
} }