New analyzer support

This commit is contained in:
Igor Nikonov 2023-12-21 17:04:03 +00:00
parent f0933d2714
commit 81b8507cc1

View File

@ -1333,14 +1333,27 @@ void Planner::buildPlanForQueryNode()
}
collectSets(query_tree, *planner_context);
const auto & settings = query_context->getSettingsRef();
if (query_context->canUseTaskBasedParallelReplicas())
{
if (planner_context->getPreparedSets().hasSubqueries())
{
if (settings.allow_experimental_parallel_reading_from_replicas == 2)
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "IN with subquery is not supported with parallel replicas");
auto & mutable_context = planner_context->getMutableQueryContext();
mutable_context->setSetting("allow_experimental_parallel_reading_from_replicas", Field(0));
LOG_DEBUG(&Poco::Logger::get("Planner"), "Disabling parallel replicas to execute a query with IN with subquery");
}
}
collectTableExpressionData(query_tree, planner_context);
checkStoragesSupportTransactions(planner_context);
if (!select_query_options.only_analyze)
collectFiltersForAnalysis(query_tree, planner_context);
const auto & settings = query_context->getSettingsRef();
if (query_context->canUseTaskBasedParallelReplicas())
{
const auto & table_expression_nodes = planner_context->getTableExpressionNodeToData();