| 23 | return planner::LogicalPlanUtil::encodeJoin(*TestRunner::getLogicalPlan(query, *conn)); |
| 24 | } |
| 25 | std::unique_ptr<planner::LogicalPlan> getRoot(const std::string& query) { |
| 26 | auto preparedStatement = conn->prepare(query); |
| 27 | if (!preparedStatement->isSuccess()) { |
| 28 | throw std::runtime_error("Failed to prepare optimizer test query:\n" + query + |
| 29 | "\nError:\n" + preparedStatement->getErrorMessage()); |
| 30 | } |
| 31 | auto cachedStatement = |
| 32 | conn->getClientContext()->getCachedPreparedStatementManager().getCachedStatement( |
| 33 | preparedStatement->getName()); |
| 34 | return std::move(cachedStatement->logicalPlan); |
| 35 | } |
| 36 | |
| 37 | // Helper to check if a specific operator type exists in the plan |
| 38 | static bool hasOperatorType(planner::LogicalOperator* op, planner::LogicalOperatorType type) { |
nothing calls this directly
no test coverage detected