propagate storage limits to subquery

This commit is contained in:
Yakov Olkhovskiy 2023-02-12 02:11:46 +00:00
parent d6b465ab9d
commit 47509aea83

View File

@ -336,6 +336,8 @@ JoinTreeQueryPlan buildQueryPlanForTableExpression(const QueryTreeNodePtr & tabl
{ {
auto subquery_options = select_query_options.subquery(); auto subquery_options = select_query_options.subquery();
Planner subquery_planner(table_expression, subquery_options, planner_context->getGlobalPlannerContext()); Planner subquery_planner(table_expression, subquery_options, planner_context->getGlobalPlannerContext());
/// Propagate storage limits to subquery
subquery_planner.addStorageLimits(*select_query_info.storage_limits);
subquery_planner.buildQueryPlanIfNeeded(); subquery_planner.buildQueryPlanIfNeeded();
query_plan = std::move(subquery_planner).extractQueryPlan(); query_plan = std::move(subquery_planner).extractQueryPlan();
} }