mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-22 09:40:49 +00:00
Fixed build after merge [#CLICKHOUSE-2].
This commit is contained in:
parent
ab490ec1fa
commit
5ab78c249d
@ -13,6 +13,11 @@
|
||||
namespace DB
|
||||
{
|
||||
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int EMPTY_LIST_OF_COLUMNS_PASSED;
|
||||
}
|
||||
|
||||
|
||||
String getTableDefinitionFromCreateQuery(const ASTPtr & query)
|
||||
{
|
||||
@ -30,7 +35,7 @@ String getTableDefinitionFromCreateQuery(const ASTPtr & query)
|
||||
create.select = nullptr;
|
||||
|
||||
/// For "MATERIALIZED VIEW x TO y" it's necessary to save destination table
|
||||
if (engine != "MaterializedView" || create.inner_storage)
|
||||
if (!(create.is_materialized_view && !create.storage))
|
||||
{
|
||||
create.as_database.clear();
|
||||
create.as_table.clear();
|
||||
|
@ -434,12 +434,6 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const
|
||||
storage_ast->set(storage_ast->engine, engine_ast);
|
||||
create.set(create.storage, storage_ast);
|
||||
}
|
||||
else if (create.is_temporary)
|
||||
set_engine("Memory");
|
||||
else if (create.is_view)
|
||||
set_engine("View");
|
||||
else if (create.is_materialized_view)
|
||||
set_engine("MaterializedView");
|
||||
else if (!create.as_table.empty())
|
||||
{
|
||||
/// NOTE Getting the structure from the table specified in the AS is done not atomically with the creation of the table.
|
||||
|
@ -81,10 +81,10 @@ StorageMaterializedView::StorageMaterializedView(
|
||||
DatabaseAndTableName(database_name, table_name));
|
||||
|
||||
// If the destination table is not set, use inner table
|
||||
if (!create.inner_storage)
|
||||
if (!query.storage)
|
||||
{
|
||||
target_database_name = create.as_database;
|
||||
target_table_name = create.as_table;
|
||||
target_database_name = query.as_database;
|
||||
target_table_name = query.as_table;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user