Skip to content

Implement array_slice function #6975

Closed
@izveigor

Description

@izveigor

Is your feature request related to a problem or challenge?

Summary

Characteristic Description
Function name: array_slice
Aliases: list_slice, array[i:j]
Original function?: No
Function Description: Clickhouse: Returns a slice of the array.
DuckDB: Extract a sublist using slice conventions. NULLs are interpreted as the bounds of the LIST. Negative values are accepted.
Sources: Concept ClickHouse DuckDB

Examples:

select array_slice([1, 2, 3, 4], 2, 3);
----
[2, 3]
select array_slice([1, 2, 3, 4], 1, 1);
----
[1]

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