Skip to content

Commit

Permalink
Update InterpreterCreateQuery.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
xiedeyantu committed Feb 18, 2024
1 parent f2a6da6 commit df6973e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Interpreters/InterpreterCreateQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,6 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const

if (create.temporary)
{
/// Some part of storage definition is specified, but ENGINE is not: just set the one from default_temporary_table_engine setting.

if (!create.cluster.empty())
throw Exception(ErrorCodes::INCORRECT_QUERY, "Temporary tables cannot be created with ON CLUSTER clause");

Expand All @@ -1052,6 +1050,7 @@ void InterpreterCreateQuery::setEngine(ASTCreateQuery & create) const
create.set(create.storage, storage_ast);
}

/// Some part of storage definition is specified, but ENGINE is not: just set the one from default_temporary_table_engine setting.
if (!create.storage->engine)
{
setDefaultTableEngine(*create.storage, getContext()->getSettingsRef().default_temporary_table_engine.value);
Expand Down

0 comments on commit df6973e

Please sign in to comment.