diff --git a/src/Interpreters/IInterpreterUnionOrSelectQuery.cpp b/src/Interpreters/IInterpreterUnionOrSelectQuery.cpp index b7931491704..27716aeca57 100644 --- a/src/Interpreters/IInterpreterUnionOrSelectQuery.cpp +++ b/src/Interpreters/IInterpreterUnionOrSelectQuery.cpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace DB @@ -28,7 +29,13 @@ IInterpreterUnionOrSelectQuery::IInterpreterUnionOrSelectQuery(const ASTPtr & qu /// it's possible that new analyzer will be enabled in ::getQueryProcessingStage method /// of the underlying storage when all other parts of infrastructure are not ready for it /// (built with old analyzer). - // context->setSetting("allow_experimental_analyzer", false); + if (context->getSettingsRef().allow_experimental_analyzer) + { + LOG_TRACE(getLogger("IInterpreterUnionOrSelectQuery"), + "The new analyzer is enabled, but the old interpreter is used. It can be a bug, please report it. Will disable 'allow_experimental_analyzer' setting (for query: {})", + query_ptr->formatForLogging()); + context->setSetting("allow_experimental_analyzer", false); + } if (options.shard_num) context->addSpecialScalar(