File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1977,15 +1977,18 @@ void Planner::buildPlanForQueryNode()
19771977 addAdditionalFilterStepIfNeeded (query_plan, query_node, select_query_options, planner_context);
19781978 }
19791979
1980+ const auto & client_info = query_context->getClientInfo ();
1981+
19801982 // Not all cases are supported here yet. E.g. for this query:
19811983 // select * from remote('127.0.0.{1,2}', numbers_mt(1e6)) group by number
19821984 // we will have `BlocksMarshallingStep` added to the query plan, but not for
19831985 // select * from remote('127.0.0.{1,2}', numbers_mt(1e6))
19841986 // because `to_stage` for it will be `QueryProcessingStage::Complete`.
19851987 if (query_context->getSettingsRef ()[Setting::enable_parallel_blocks_marshalling]
1986- && query_context-> getClientInfo () .query_kind == ClientInfo::QueryKind::SECONDARY_QUERY
1988+ && client_info .query_kind == ClientInfo::QueryKind::SECONDARY_QUERY
19871989 && select_query_options.to_stage != QueryProcessingStage::Complete // Don't do it for INSERT SELECT, for example
1988- && query_context->getClientInfo ().distributed_depth <= 1 // Makes sense for higher depths too, just not supported
1990+ && client_info.distributed_depth <= 1 // Makes sense for higher depths too, just not supported
1991+ && !client_info.is_replicated_database_internal
19891992 )
19901993 query_plan.addStep (std::make_unique<BlocksMarshallingStep>(query_plan.getCurrentHeader ()));
19911994
You can’t perform that action at this time.
0 commit comments