MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / buildWindowList

Method buildWindowList

src/Analyzer/QueryTreeBuilder.cpp:627–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

625}
626
627QueryTreeNodePtr 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
647QueryTreeNodePtr QueryTreeBuilder::buildExpressionList(const ASTPtr & expression_list, const ContextPtr & context) const
648{

Callers

nothing calls this directly

Calls 5

getNodesMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
setAliasMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected