This commit is contained in:
Alexander Kuzmenkov 2020-08-06 00:53:35 +03:00
parent 3b1bacf390
commit 45b57f2df5
5 changed files with 8 additions and 11 deletions

View File

@ -522,6 +522,11 @@ template <> bool decimalEqual(Decimal128 x, Decimal128 y, UInt32 x_scale, UInt32
template <> bool decimalLess(Decimal128 x, Decimal128 y, UInt32 x_scale, UInt32 y_scale) { return decLess(x, y, x_scale, y_scale); }
template <> bool decimalLessOrEqual(Decimal128 x, Decimal128 y, UInt32 x_scale, UInt32 y_scale) { return decLessOrEqual(x, y, x_scale, y_scale); }
inline void writeText(const Null &, WriteBuffer & buf)
{
writeText(std::string("Null"), buf);
}
String toString(const Field & x)
{
return Field::dispatch(

View File

@ -873,14 +873,6 @@ inline void writeText(const DecimalField<T> & value, WriteBuffer & buf)
writeText(value.getValue(), value.getScale(), buf);
}
void writeText(const std::string &, WriteBuffer & buf);
inline void writeText(const Null &, WriteBuffer & buf)
{
writeText(std::string("Null"), buf);
}
template <typename T>
void readQuoted(DecimalField<T> & x, ReadBuffer & buf);

View File

@ -112,7 +112,7 @@ void buildLayoutConfiguration(
{
throw DB::Exception(ErrorCodes::BAD_ARGUMENTS,
"Dictionary layout parameter value must be a literal, got '{}' instead",
pair->second ? pair->second->formatForErrorMessage() : "<none>");
pair->second->formatForErrorMessage());
}
const auto value_field = value_literal->value;

View File

@ -15,7 +15,7 @@ public:
/// Name or key of pair
String first;
/// Value of pair, which can be also list of pairs
IAST * second;
IAST * second = nullptr;
/// Value is closed in brackets (HOST '127.0.0.1')
bool second_with_brackets;

View File

@ -74,7 +74,7 @@ TEST(ParserDictionaryDDL, SimpleDictionary)
/// layout test
auto * layout = create->dictionary->layout;
EXPECT_EQ(layout->layout_type, "flat");
EXPECT_EQ(layout->children.size(), 0);
EXPECT_EQ(layout->parameters->children.size(), 0);
/// lifetime test
auto * lifetime = create->dictionary->lifetime;