/src/duckdb/src/planner/binder/statement/bind_call.cpp
Line | Count | Source |
1 | | #include "duckdb/parser/statement/call_statement.hpp" |
2 | | #include "duckdb/parser/tableref/table_function_ref.hpp" |
3 | | #include "duckdb/planner/binder.hpp" |
4 | | #include "duckdb/parser/query_node/select_node.hpp" |
5 | | #include "duckdb/parser/expression/star_expression.hpp" |
6 | | |
7 | | namespace duckdb { |
8 | | |
9 | 6 | BoundStatement Binder::Bind(CallStatement &stmt) { |
10 | 6 | SelectStatement select_statement; |
11 | 6 | auto select_node = make_uniq<SelectNode>(); |
12 | 6 | auto table_function = make_uniq<TableFunctionRef>(); |
13 | 6 | table_function->function = std::move(stmt.function); |
14 | 6 | select_node->select_list.push_back(make_uniq<StarExpression>()); |
15 | 6 | select_node->from_table = std::move(table_function); |
16 | 6 | select_statement.node = std::move(select_node); |
17 | | |
18 | 6 | auto result = Bind(select_statement); |
19 | 6 | auto &properties = GetStatementProperties(); |
20 | 6 | properties.output_type = QueryResultOutputType::FORCE_MATERIALIZED; |
21 | 6 | return result; |
22 | 6 | } |
23 | | |
24 | | } // namespace duckdb |