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

Function makeUsingAST

src/Analyzer/JoinNode.cpp:96–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96static ASTPtr makeUsingAST(const QueryTreeNodePtr & node)
97{
98 const auto & list_node = node->as<ListNode &>();
99
100 auto expr_list = make_intrusive<ASTExpressionList>();
101 expr_list->children.reserve(list_node.getNodes().size());
102
103 for (const auto & child : list_node.getNodes())
104 {
105 ASTPtr node_ast = tryMakeUsingColumnASTWithAlias(child);
106
107 if (!node_ast)
108 node_ast = child->toAST();
109
110 expr_list->children.push_back(std::move(node_ast));
111 }
112
113 return expr_list;
114}
115
116ASTPtr JoinNode::toASTTableJoin() const
117{

Callers 1

toASTTableJoinMethod · 0.85

Calls 6

getNodesMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
toASTMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected