Cosmetics [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2017-07-03 21:29:56 +03:00
parent c170b6f0d2
commit 15cf838250

View File

@ -58,20 +58,16 @@ void DataTypeEnum<Type>::fillMaps()
if (!name_to_value_pair.second)
throw Exception{
"Duplicate names in enum: '" + name_and_value.first + "' = " + toString(name_and_value.second)
+ " and '" + name_to_value_pair.first->first.toString() + "' = " + toString(
name_to_value_pair.first->second),
ErrorCodes::SYNTAX_ERROR
};
+ " and '" + name_to_value_pair.first->first.toString() + "' = " + toString(name_to_value_pair.first->second),
ErrorCodes::SYNTAX_ERROR};
const auto value_to_name_pair = value_to_name_map.insert(
{ name_and_value.second, StringRef{name_and_value.first} });
if (!value_to_name_pair.second)
throw Exception{
"Duplicate values in enum: '" + name_and_value.first + "' = " + toString(name_and_value.second)
+ " and '" + value_to_name_pair.first->second.toString() + "' = " + toString(
value_to_name_pair.first->first),
ErrorCodes::SYNTAX_ERROR
};
+ " and '" + value_to_name_pair.first->second.toString() + "' = " + toString(value_to_name_pair.first->first),
ErrorCodes::SYNTAX_ERROR};
}
}