From df6973ec1de2347b907003ee7b7f07dd8bde40c4 Mon Sep 17 00:00:00 2001 From: chen Date: Sun, 18 Feb 2024 23:55:18 +0800 Subject: [PATCH] Update InterpreterCreateQuery.cpp --- src/Interpreters/InterpreterCreateQuery.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Interpreters/InterpreterCreateQuery.cpp b/src/Interpreters/InterpreterCreateQuery.cpp index c8229f4274db..c3b75a6ca90a 100644 --- a/src/Interpreters/InterpreterCreateQuery.cpp +++ b/src/Interpreters/InterpreterCreateQuery.cpp @@ -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"); @@ -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);