| 625 | } |
| 626 | |
| 627 | QueryTreeNodePtr QueryTreeBuilder::buildWindowList(const ASTPtr & window_definition_list, const ContextPtr & context) const |
| 628 | { |
| 629 | auto list_node = std::make_shared<ListNode>(); |
| 630 | |
| 631 | auto & expression_list_typed = window_definition_list->as<ASTExpressionList &>(); |
| 632 | list_node->getNodes().reserve(expression_list_typed.children.size()); |
| 633 | |
| 634 | for (auto & window_list_element : expression_list_typed.children) |
| 635 | { |
| 636 | const auto & window_list_element_typed = window_list_element->as<const ASTWindowListElement &>(); |
| 637 | |
| 638 | auto window_node = buildWindow(window_list_element_typed.definition, context); |
| 639 | window_node->setAlias(window_list_element_typed.name); |
| 640 | |
| 641 | list_node->getNodes().push_back(std::move(window_node)); |
| 642 | } |
| 643 | |
| 644 | return list_node; |
| 645 | } |
| 646 | |
| 647 | QueryTreeNodePtr QueryTreeBuilder::buildExpressionList(const ASTPtr & expression_list, const ContextPtr & context) const |
| 648 | { |