| 1 | #include "duckdb/execution/operator/schema/physical_create_function.hpp" |
|---|---|
| 2 | |
| 3 | #include "duckdb/catalog/catalog.hpp" |
| 4 | #include "duckdb/catalog/catalog_entry/scalar_macro_catalog_entry.hpp" |
| 5 | |
| 6 | namespace duckdb { |
| 7 | |
| 8 | //===--------------------------------------------------------------------===// |
| 9 | // Source |
| 10 | //===--------------------------------------------------------------------===// |
| 11 | SourceResultType PhysicalCreateFunction::GetData(ExecutionContext &context, DataChunk &chunk, |
| 12 | OperatorSourceInput &input) const { |
| 13 | auto &catalog = Catalog::GetCatalog(context&: context.client, catalog_name: info->catalog); |
| 14 | catalog.CreateFunction(context&: context.client, info&: *info); |
| 15 | |
| 16 | return SourceResultType::FINISHED; |
| 17 | } |
| 18 | |
| 19 | } // namespace duckdb |
| 20 |