| 1 | #include "duckdb/parser/parsed_data/create_aggregate_function_info.hpp" |
|---|---|
| 2 | |
| 3 | namespace duckdb { |
| 4 | |
| 5 | CreateAggregateFunctionInfo::CreateAggregateFunctionInfo(AggregateFunction function) |
| 6 | : CreateFunctionInfo(CatalogType::AGGREGATE_FUNCTION_ENTRY), functions(function.name) { |
| 7 | name = function.name; |
| 8 | functions.AddFunction(function: std::move(function)); |
| 9 | internal = true; |
| 10 | } |
| 11 | |
| 12 | CreateAggregateFunctionInfo::CreateAggregateFunctionInfo(AggregateFunctionSet set) |
| 13 | : CreateFunctionInfo(CatalogType::AGGREGATE_FUNCTION_ENTRY), functions(std::move(set)) { |
| 14 | name = functions.name; |
| 15 | for (auto &func : functions.functions) { |
| 16 | func.name = functions.name; |
| 17 | } |
| 18 | internal = true; |
| 19 | } |
| 20 | |
| 21 | unique_ptr<CreateInfo> CreateAggregateFunctionInfo::Copy() const { |
| 22 | auto result = make_uniq<CreateAggregateFunctionInfo>(args: functions); |
| 23 | CopyProperties(other&: *result); |
| 24 | return std::move(result); |
| 25 | } |
| 26 | |
| 27 | } // namespace duckdb |
| 28 |