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

Implement array_slice function #6975

Closed
izveigor opened this issue Jul 15, 2023 · 0 comments · Fixed by #6936
Closed

Implement array_slice function #6975

izveigor opened this issue Jul 15, 2023 · 0 comments · Fixed by #6936
Labels
enhancement New feature or request

Comments

@izveigor
Copy link
Contributor

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

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.

1 participant