fix defaults with list expressions

This commit is contained in:
chertus 2018-07-12 13:03:49 +03:00
parent 2876aadba7
commit a7fcae2759
2 changed files with 6 additions and 3 deletions

View File

@ -6,7 +6,7 @@
#include <Storages/TableMetadata.h>
#include <Parsers/formatAST.h>
#include <Parsers/parseQuery.h>
#include <Parsers/ExpressionElementParsers.h>
#include <Parsers/ExpressionListParsers.h>
#include <Core/ColumnWithTypeAndName.h>
#include <Columns/IColumn.h>
#include <Core/Block.h>
@ -116,7 +116,7 @@ namespace DB
size_t data_size = proto_column.column->byteSize();
Proto::Context::Reader proto_context = deserializeProto<Proto::Context>(plain_data.data, data_size);
ParserExpressionElement parser;
ParserTernaryOperatorExpression parser;
for (auto proto_database : proto_context.getDatabases())
{

View File

@ -6,7 +6,10 @@ CREATE TABLE IF NOT EXISTS test.defaults
y UInt32,
a UInt32 DEFAULT x + y,
b Float32 DEFAULT log(1 + x + y),
c UInt32 DEFAULT 42
c UInt32 DEFAULT 42,
d DEFAULT x + y,
e MATERIALIZED x + y,
f ALIAS x + y
) ENGINE = Memory;
INSERT INTO test.defaults FORMAT JSONEachRow {"x":1, "y":1};