diff --git a/src/Interpreters/SystemLog.cpp b/src/Interpreters/SystemLog.cpp index db46097b06a..59545d4314d 100644 --- a/src/Interpreters/SystemLog.cpp +++ b/src/Interpreters/SystemLog.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -472,8 +473,13 @@ ASTPtr SystemLog::getCreateTableQuery() /// Write additional (default) settings for MergeTree engine to make it make it possible to compare ASTs /// and recreate tables on settings changes. - auto storage_settings = std::make_unique(getContext()->getMergeTreeSettings()); - storage_settings->loadFromQuery(*create->storage); + const auto & engine = create->storage->engine->as(); + if (endsWith(engine.name, "MergeTree")) + { + auto storage_settings = std::make_unique(getContext()->getMergeTreeSettings()); + storage_settings->loadFromQuery(*create->storage); + } + return create; }