Add support for new create_if_not_exists setting in InterpreterCreateQuery.cpp

This commit is contained in:
Peter Nguyen 2024-08-11 11:47:30 -06:00
parent f90b8327be
commit 868a1e78f2

View File

@ -1946,6 +1946,8 @@ BlockIO InterpreterCreateQuery::execute()
FunctionNameNormalizer::visit(query_ptr.get());
auto & create = query_ptr->as<ASTCreateQuery &>();
create.if_not_exists |= getContext()->getSettingsRef().create_if_not_exists;
bool is_create_database = create.database && !create.table;
if (!create.cluster.empty() && !maybeRemoveOnCluster(query_ptr, getContext()))
{