Skip to content

Support stride for array_slice #8784

Closed

Description

@Weijun-H

Is your feature request related to a problem or challenge?

Currently, the array_slice function only accepts three arguments: the array, from, and to. However, it would be more convenient if it also supported a stride parameter.

Expect result

array_slice([1, 2, 3, 4], 1, 3, 2) --> [1, 3]

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. Weijun-H commented on Jan 8, 2024

    @Weijun-H
    MemberAuthor

    I will work on this ticket.

  2. alamb commented on Jan 8, 2024

    @alamb
    Contributor

    I wonder if there is any other database system that has array_slice and that we can use as a prototype for our syntax and function support?

  3. Weijun-H commented on Jan 9, 2024

    @Weijun-H
    MemberAuthor

    I wonder if there is any other database system that has array_slice and that we can use as a prototype for our syntax and function support?

    In DuckDB, it has list_slice(list, begin, end, step) @alamb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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