mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-19 04:42:37 +00:00
Clean up
This commit is contained in:
parent
270d8a3eaf
commit
af13166972
@ -961,7 +961,7 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(QueryTreeNodePtr table_expres
|
||||
/// query_plan can be empty if there is nothing to read
|
||||
if (query_plan.isInitialized() && parallel_replicas_enabled_for_storage(storage, settings))
|
||||
{
|
||||
auto allow_parallel_replicas_for_table_expression = [](const QueryTreeNodePtr & join_tree_node, const QueryTreeNodePtr & /*table_expression_node*/)
|
||||
auto allow_parallel_replicas_for_table_expression = [](const QueryTreeNodePtr & join_tree_node)
|
||||
{
|
||||
const JoinNode * join_node = join_tree_node->as<JoinNode>();
|
||||
if (!join_node)
|
||||
@ -969,11 +969,8 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(QueryTreeNodePtr table_expres
|
||||
|
||||
const auto join_kind = join_node->getKind();
|
||||
const auto join_strictness = join_node->getStrictness();
|
||||
if (join_kind == JoinKind::Left || join_kind == JoinKind::Right)
|
||||
return true;
|
||||
|
||||
if (join_kind == JoinKind::Inner && join_strictness == JoinStrictness::All)
|
||||
// return join_node->getLeftTableExpression() == table_expression_node;
|
||||
if (join_kind == JoinKind::Left || join_kind == JoinKind::Right
|
||||
|| (join_kind == JoinKind::Inner && join_strictness == JoinStrictness::All))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@ -1003,7 +1000,7 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(QueryTreeNodePtr table_expres
|
||||
}
|
||||
else if (
|
||||
ClusterProxy::canUseParallelReplicasOnInitiator(query_context)
|
||||
&& allow_parallel_replicas_for_table_expression(parent_join_tree, table_expression))
|
||||
&& allow_parallel_replicas_for_table_expression(parent_join_tree))
|
||||
{
|
||||
// (1) find read step
|
||||
QueryPlan::Node * node = query_plan.getRootNode();
|
||||
|
Loading…
Reference in New Issue
Block a user