@@ -616,13 +616,13 @@ static inline void DS{{sketch_type}}{{unary_function.name}}(DataChunk &args, Exp
616616 {% endif %}
617617 {
618618 {% if sketch_type == "HLL" %}
619- return AggregateFunction::UnaryAggregateDestructor<DS {{sketch_type}}State, string_t, string_t, DSHLLMergeOperation <DS{{sketch_type}}BindData >>(
619+ return AggregateFunction::UnaryAggregateDestructor<DS {{sketch_type}}State, string_t, string_t, DSHLLMergeOperation <DS{{sketch_type}}BindData >, AggregateDestructorType::LEGACY >(
620620 result_type, result_type);
621621 {% elif sketch_type == "CPC" %}
622- return AggregateFunction::UnaryAggregateDestructor<DS {{sketch_type}}State, string_t, string_t, DSCPCMergeOperation <DS{{sketch_type}}BindData >>(
622+ return AggregateFunction::UnaryAggregateDestructor<DS {{sketch_type}}State, string_t, string_t, DSCPCMergeOperation <DS{{sketch_type}}BindData >, AggregateDestructorType::LEGACY >(
623623 result_type, result_type);
624624 {% else %}
625- return AggregateFunction::UnaryAggregateDestructor<DS {{sketch_type}}State <T >, string_t, string_t, DSQuantilesMergeOperation<DS {{sketch_type}}BindData >>(
625+ return AggregateFunction::UnaryAggregateDestructor<DS {{sketch_type}}State <T >, string_t, string_t, DSQuantilesMergeOperation<DS {{sketch_type}}BindData >, AggregateDestructorType::LEGACY >(
626626 result_type, result_type);
627627 {% endif %}
628628 }
@@ -633,13 +633,13 @@ static inline void DS{{sketch_type}}{{unary_function.name}}(DataChunk &args, Exp
633633 auto static DS{{sketch_type}}CreateAggregate(const LogicalType &type, const LogicalType &result_type) -> AggregateFunction
634634 {
635635 {% if sketch_type == 'HLL' %}
636- return AggregateFunction::UnaryAggregateDestructor<DS {{sketch_type}}State, T, string_t, DSHLLCreateOperation <DS{{sketch_type}}BindData >>(
636+ return AggregateFunction::UnaryAggregateDestructor<DS {{sketch_type}}State, T, string_t, DSHLLCreateOperation <DS{{sketch_type}}BindData >, AggregateDestructorType::LEGACY >(
637637 type, result_type);
638638 {% elif sketch_type == 'CPC' %}
639- return AggregateFunction::UnaryAggregateDestructor<DS {{sketch_type}}State, T, string_t, DSCPCCreateOperation <DS{{sketch_type}}BindData >>(
639+ return AggregateFunction::UnaryAggregateDestructor<DS {{sketch_type}}State, T, string_t, DSCPCCreateOperation <DS{{sketch_type}}BindData >, AggregateDestructorType::LEGACY >(
640640 type, result_type);
641641 {% else %}
642- return AggregateFunction::UnaryAggregateDestructor<DS {{sketch_type}}State <T >, T, string_t, DSQuantilesCreateOperation<DS {{sketch_type}}BindData >>(
642+ return AggregateFunction::UnaryAggregateDestructor<DS {{sketch_type}}State <T >, T, string_t, DSQuantilesCreateOperation<DS {{sketch_type}}BindData >, AggregateDestructorType::LEGACY >(
643643 type, result_type);
644644 {% endif %}
645645 }
@@ -675,8 +675,13 @@ static inline void DS{{sketch_type}}{{unary_function.name}}(DataChunk &args, Exp
675675 {% endif %}
676676
677677 CreateScalarFunctionInfo info(std::move(fs));
678- info.description = "{{unary_function.description}}";
679- info.example = "{{unary_function.example}}";
678+
679+ {
680+ FunctionDescription desc;
681+ desc.description = "{{unary_function.description}}";
682+ desc.examples.push_back("{{unary_function.example}}");
683+ info.descriptions.push_back(desc);
684+ }
680685
681686 system_catalog.CreateFunction(data, info);
682687
@@ -713,8 +718,15 @@ static inline void DS{{sketch_type}}{{unary_function.name}}(DataChunk &args, Exp
713718 {% endif %}
714719 {% - endfor %}
715720 CreateAggregateFunctionInfo sketch_info(sketch);
716- sketch_info.description = "Creates a sketch_{{sketch_type|lower}} data sketch by aggregating values or by aggregating other {{sketch_type}} data sketches";
717- sketch_info.example = "datasketch_{{sketch_type|lower}}(k, data)";
721+
722+
723+ {
724+ FunctionDescription desc;
725+ desc.description = "Creates a sketch_{{sketch_type|lower}} data sketch by aggregating values or by aggregating other {{sketch_type}} data sketches";
726+ desc.examples.push_back("datasketch_{{sketch_type|lower}}(k, data)");
727+ sketch_info.descriptions.push_back(desc);
728+ }
729+
718730 system_catalog.CreateFunction(data, sketch_info);
719731 }
720732
@@ -728,8 +740,14 @@ static inline void DS{{sketch_type}}{{unary_function.name}}(DataChunk &args, Exp
728740 fun.arguments.insert(fun.arguments.begin(), {{cpp_type_mapping[sketch_k_cpp_type[sketch_type]] }});
729741 sketch.AddFunction(fun);
730742 CreateAggregateFunctionInfo sketch_info(sketch);
731- sketch_info.description = "Creates a sketch_{{sketch_type}} data sketch by aggregating other {{sketch_type}} data sketches";
732- sketch_info.comment = "datasketch_{{sketch_type|lower}}_union(k, data)";
743+
744+ {
745+ FunctionDescription desc;
746+ desc.description = "Creates a sketch_{{sketch_type}} data sketch by aggregating other {{sketch_type}} data sketches";
747+ desc.examples.push_back("datasketch_{{sketch_type|lower}}_union(k, data)");
748+ sketch_info.descriptions.push_back(desc);
749+ }
750+
733751 system_catalog.CreateFunction(data, sketch_info);
734752 }
735753 {% endif %}
0 commit comments