| 1 | #include "duckdb/execution/operator/scan/physical_table_function.hpp" |
|---|---|
| 2 | |
| 3 | #include "duckdb/catalog/catalog_entry/schema_catalog_entry.hpp" |
| 4 | #include "duckdb/catalog/catalog_entry/table_function_catalog_entry.hpp" |
| 5 | #include "duckdb/execution/expression_executor.hpp" |
| 6 | #include "duckdb/planner/expression/bound_function_expression.hpp" |
| 7 | |
| 8 | using namespace duckdb; |
| 9 | using namespace std; |
| 10 | |
| 11 | void PhysicalTableFunction::GetChunkInternal(ClientContext &context, DataChunk &chunk, PhysicalOperatorState *state) { |
| 12 | // run main code |
| 13 | function->function.function(context, parameters, chunk, bind_data.get()); |
| 14 | if (chunk.size() == 0) { |
| 15 | // finished, call clean up |
| 16 | if (function->function.final) { |
| 17 | function->function.final(context, bind_data.get()); |
| 18 | } |
| 19 | } |
| 20 | } |
| 21 |