| 1922 | } |
| 1923 | |
| 1924 | void Planner::buildQueryPlanIfNeeded() |
| 1925 | { |
| 1926 | if (query_plan.isInitialized()) |
| 1927 | return; |
| 1928 | |
| 1929 | LOG_TRACE( |
| 1930 | log, |
| 1931 | "Query to stage {}{}", |
| 1932 | QueryProcessingStage::toString(select_query_options.to_stage), |
| 1933 | select_query_options.only_analyze ? " only analyze" : ""); |
| 1934 | |
| 1935 | if (query_tree->getNodeType() == QueryTreeNodeType::UNION) |
| 1936 | buildPlanForUnionNode(); |
| 1937 | else |
| 1938 | buildPlanForQueryNode(); |
| 1939 | extendQueryContextAndStoragesLifetime(query_plan, planner_context); |
| 1940 | } |
| 1941 | |
| 1942 | void Planner::buildPlanForUnionNode() |
| 1943 | { |
no test coverage detected