Skip to content

Implement array_pop_front function #6996

Closed
@izveigor

Description

@izveigor

Is your feature request related to a problem or challenge?

Summary

Characteristic Description
Function name: array_pop_front
Aliases: list_pop_front
Original function?: No
Function Description: ClickHouse: Removes the first item from the array.
DuckDB: Returns the list without the first element.
Sources: Concept DuckDB ClickHouse

Examples:

D select array_pop_front([1, 2, 3, 4]);
┌──────────────────────────────────────────────┐
│ array_pop_front(main.list_value(1, 2, 3, 4)) │
│                   int32[]                    │
├──────────────────────────────────────────────┤
│ [2, 3, 4]                                    │
└──────────────────────────────────────────────┘
D select array_pop_front([[1, 2], [3, 4], [4, 2]]);
┌──────────────────────────────────────────────────────────────────────────────┐
│ array_pop_front(main.list_value(main.list_value(1, 2), main.list_value(3, …  │
│                                  int32[][]                                   │
├──────────────────────────────────────────────────────────────────────────────┤
│ [[3, 4], [4, 2]]                                                             │
└──────────────────────────────────────────────────────────────────────────────┘

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