1 | #include "duckdb/parser/statement/select_statement.hpp" |
---|---|
2 | #include "duckdb/parser/transformer.hpp" |
3 | #include "duckdb/common/string_util.hpp" |
4 | |
5 | using namespace duckdb; |
6 | using namespace std; |
7 | |
8 | unique_ptr<SelectStatement> Transformer::TransformSelect(PGNode *node) { |
9 | auto stmt = reinterpret_cast<PGSelectStmt *>(node); |
10 | auto result = make_unique<SelectStatement>(); |
11 | |
12 | // may contain windows so second |
13 | if (stmt->withClause) { |
14 | TransformCTE(reinterpret_cast<PGWithClause *>(stmt->withClause), *result); |
15 | } |
16 | |
17 | result->node = TransformSelectNode(stmt); |
18 | return result; |
19 | } |
20 |