Skip to content

Implement array_aggregate function #7213

@izveigor

Description

@izveigor

Is your feature request related to a problem or challenge?

Summary

Characteristic Description
Function name: array_aggregate
Aliases: list_aggregate, array_aggr, list_aggr
Original function?: No
Function Description: DuckDB: Executes the aggregate function name on the elements of list. See the List Aggregates section for more details.
Sources: Concept DuckDB

Examples:

D select list_aggregate([1, 2, NULL], 'min');
┌────────────────────────────────────────────────────┐
│ list_aggregate(main.list_value(1, 2, NULL), 'min') │
│                       int32                        │
├────────────────────────────────────────────────────┤
│                                                  1 │
└────────────────────────────────────────────────────┘
D select list_aggregate([1, 3, NULL, 5], 'sum');
┌───────────────────────────────────────────────────────┐
│ list_aggregate(main.list_value(1, 3, NULL, 5), 'sum') │
│                        int128                         │
├───────────────────────────────────────────────────────┤
│                                                     9 │
└───────────────────────────────────────────────────────┘

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions