Add logs when disabling analyzer

This commit is contained in:
Dmitry Novik 2024-09-17 18:23:43 +02:00
parent 17e4616924
commit f44960bb63

View File

@ -12,6 +12,7 @@
#include <Interpreters/ExpressionAnalyzer.h>
#include <Interpreters/TreeRewriter.h>
#include <Processors/QueryPlan/FilterStep.h>
#include <Common/Logger.h>
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(