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

Method getRoot

test/optimizer/optimizer_test.cpp:58–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 }
57
58 std::unique_ptr<planner::LogicalPlan> getRoot(const std::string& query) {
59 auto preparedStatement = conn->prepare(query);
60 if (!preparedStatement->isSuccess()) {
61 throw std::runtime_error("Failed to prepare optimizer test query:\n" + query +
62 "\nError:\n" + preparedStatement->getErrorMessage());
63 }
64 auto cachedStatement =
65 conn->getClientContext()->getCachedPreparedStatementManager().getCachedStatement(
66 preparedStatement->getName());
67 return std::move(cachedStatement->logicalPlan);
68 }
69
70 static planner::LogicalFilter* getDeepestFilter(planner::LogicalOperator* op) {
71 planner::LogicalFilter* result = nullptr;

Callers

nothing calls this directly

Calls 6

getCachedStatementMethod · 0.80
prepareMethod · 0.45
isSuccessMethod · 0.45
getErrorMessageMethod · 0.45
getClientContextMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected