mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Better
This commit is contained in:
parent
0f63a32d12
commit
6441c59607
@ -64,21 +64,15 @@ std::pair<std::unique_ptr<QueryPlan>, bool> createLocalPlanForParallelReplicas(
|
||||
if (reading)
|
||||
break;
|
||||
|
||||
const JoinStep * join = typeid_cast<JoinStep*>(node->step.get());
|
||||
if (join)
|
||||
if (!node->children.empty())
|
||||
{
|
||||
chassert(node->children.size() == 2);
|
||||
|
||||
const auto kind = join->getJoin()->getTableJoin().kind();
|
||||
if (kind == JoinKind::Right)
|
||||
// in case of RIGHT JOIN, - reading from right table is parallelized among replicas
|
||||
const JoinStep * join = typeid_cast<JoinStep*>(node->step.get());
|
||||
if (join && join->getJoin()->getTableJoin().kind() == JoinKind::Right)
|
||||
node = node->children.at(1);
|
||||
else
|
||||
node = node->children.at(0);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!node->children.empty())
|
||||
node = node->children.at(0);
|
||||
else
|
||||
node = nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user