MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / planQuery

Method planQuery

src/planner/query_planner.cpp:12–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace planner {
11
12LogicalPlan Planner::planQuery(const BoundStatement& boundStatement) {
13 auto& regularQuery = boundStatement.constCast<BoundRegularQuery>();
14 if (regularQuery.getNumSingleQueries() == 1) {
15 return planSingleQuery(*regularQuery.getSingleQuery(0));
16 }
17 std::vector<LogicalPlan> childrenPlans;
18 for (auto i = 0u; i < regularQuery.getNumSingleQueries(); i++) {
19 childrenPlans.push_back(planSingleQuery(*regularQuery.getSingleQuery(i)));
20 }
21 auto exprs = regularQuery.getStatementResult()->getColumns();
22 return createUnionPlan(childrenPlans, exprs, regularQuery.getIsUnionAll(0));
23}
24
25LogicalPlan Planner::createUnionPlan(std::vector<LogicalPlan>& childrenPlans,
26 const expression_vector& expressions, bool isUnionAll) {

Callers

nothing calls this directly

Calls 6

getNumSingleQueriesMethod · 0.45
getSingleQueryMethod · 0.45
push_backMethod · 0.45
getColumnsMethod · 0.45
getStatementResultMethod · 0.45
getIsUnionAllMethod · 0.45

Tested by

no test coverage detected