Fixinmore tests.

This commit is contained in:
Nikolai Kochetov 2024-12-13 12:20:28 +00:00
parent 3986912b91
commit 6b82159a29

View File

@ -2092,10 +2092,12 @@ JoinTreeQueryPlan buildJoinTreeQueryPlan(const QueryTreeNodePtr & query_node,
{ {
const auto & table_expression = table_expressions_stack[i]; const auto & table_expression = table_expressions_stack[i];
auto table_expression_type = table_expression->getNodeType(); auto table_expression_type = table_expression->getNodeType();
if (table_expression_type == QueryTreeNodeType::JOIN || if (table_expression_type == QueryTreeNodeType::ARRAY_JOIN)
table_expression_type == QueryTreeNodeType::CROSS_JOIN)
continue; continue;
if (table_expression_type == QueryTreeNodeType::CROSS_JOIN)
joins_count += table_expression->as<const CrossJoinNode &>().getTableExpressions().size() - 1;
if (table_expression_type == QueryTreeNodeType::JOIN) if (table_expression_type == QueryTreeNodeType::JOIN)
{ {
++joins_count; ++joins_count;
@ -2118,7 +2120,9 @@ JoinTreeQueryPlan buildJoinTreeQueryPlan(const QueryTreeNodePtr & query_node,
QueryTreeNodePtr parent_join_tree = join_tree_node; QueryTreeNodePtr parent_join_tree = join_tree_node;
for (const auto & node : table_expressions_stack) for (const auto & node : table_expressions_stack)
{ {
if (node->getNodeType() == QueryTreeNodeType::JOIN || node->getNodeType() == QueryTreeNodeType::ARRAY_JOIN) if (node->getNodeType() == QueryTreeNodeType::JOIN ||
node->getNodeType() == QueryTreeNodeType::CROSS_JOIN ||
node->getNodeType() == QueryTreeNodeType::ARRAY_JOIN)
{ {
parent_join_tree = node; parent_join_tree = node;
break; break;