| 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; |
nothing calls this directly
no test coverage detected