mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 17:50:47 +00:00
Merge
This commit is contained in:
parent
03a0e1e1ef
commit
08f4af22e1
@ -18,6 +18,8 @@ public:
|
||||
ASTPtr columns;
|
||||
String format;
|
||||
ASTPtr select;
|
||||
/// Идентификатор запроса INSERT. Используется при репликации.
|
||||
String insert_id;
|
||||
/// Данные для вставки
|
||||
const char * data;
|
||||
const char * end;
|
||||
|
@ -217,11 +217,10 @@ StoragePtr StorageFactory::get(
|
||||
|
||||
ASTs & args_func = dynamic_cast<ASTFunction &>(*dynamic_cast<ASTCreateQuery &>(*query).storage).children;
|
||||
|
||||
if (args_func.size() != 1)
|
||||
throw Exception("Unexpected AST structure.",
|
||||
ErrorCodes::UNEXPECTED_AST_STRUCTURE);
|
||||
ASTs args;
|
||||
|
||||
ASTs args = dynamic_cast<ASTExpressionList &>(*args_func.at(0)).children;
|
||||
if (args_func.size() == 1)
|
||||
args = dynamic_cast<ASTExpressionList &>(*args_func.at(0)).children;
|
||||
|
||||
size_t additional_params = (replicated ? 2 : 0) + (mode == MergeTreeData::Collapsing ? 1 : 0);
|
||||
if (args.size() != additional_params + 3 && args.size() != additional_params + 4)
|
||||
@ -232,7 +231,7 @@ StoragePtr StorageFactory::get(
|
||||
params += "name of column with date, [name of column for sampling], primary key expression, index granularity";
|
||||
if (mode == MergeTreeData::Collapsing)
|
||||
params += "sign column";
|
||||
throw Exception("Storage CollapsingMergeTree requires " + toString(additional_params + 3) + " or "
|
||||
throw Exception("Storage " + name + " requires " + toString(additional_params + 3) + " or "
|
||||
+ toString(additional_params + 4) +" parameters: " + params,
|
||||
ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user