mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-05 05:52:05 +00:00
Fix
This commit is contained in:
parent
de5ba95639
commit
6faa4dd20c
@ -873,19 +873,18 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(QueryTreeNodePtr table_expres
|
|||||||
ReadFromMergeTree * reading = nullptr;
|
ReadFromMergeTree * reading = nullptr;
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
IQueryPlanStep * step = typeid_cast<ISourceStep *>(node->step.get());
|
reading = typeid_cast<ReadFromMergeTree *>(node->step.get());
|
||||||
if (step)
|
if (reading)
|
||||||
{
|
|
||||||
reading = typeid_cast<ReadFromMergeTree *>(step);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
if (!node->children.empty())
|
if (!node->children.empty())
|
||||||
node = node->children.at(0);
|
node = node->children.at(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chassert(reading);
|
||||||
|
|
||||||
// (2) if it's ReadFromMergeTree - run index analysis and check number of rows to read
|
// (2) if it's ReadFromMergeTree - run index analysis and check number of rows to read
|
||||||
if (reading && settings.parallel_replicas_min_number_of_rows_per_replica > 0)
|
if (settings.parallel_replicas_min_number_of_rows_per_replica > 0)
|
||||||
{
|
{
|
||||||
auto result_ptr = reading->selectRangesToRead(reading->getParts(), reading->getAlterConvertionsForParts());
|
auto result_ptr = reading->selectRangesToRead(reading->getParts(), reading->getAlterConvertionsForParts());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user