Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support stride for array_slice #8784

Closed
Weijun-H opened this issue Jan 8, 2024 · 3 comments · Fixed by #8829
Closed

Support stride for array_slice #8784

Weijun-H opened this issue Jan 8, 2024 · 3 comments · Fixed by #8829
Labels
enhancement New feature or request

Comments

@Weijun-H
Copy link
Member

Weijun-H commented Jan 8, 2024

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

@Weijun-H Weijun-H added the enhancement New feature or request label Jan 8, 2024
@Weijun-H
Copy link
Member Author

Weijun-H commented Jan 8, 2024

I will work on this ticket.

@alamb
Copy link
Contributor

alamb commented Jan 8, 2024

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?

@Weijun-H
Copy link
Member Author

Weijun-H commented Jan 9, 2024

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
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants