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_repeat function #7197

Closed
izveigor opened this issue Aug 4, 2023 · 0 comments · Fixed by #7199
Closed

Implement array_repeat function #7197

izveigor opened this issue Aug 4, 2023 · 0 comments · Fixed by #7199
Labels
enhancement New feature or request

Comments

@izveigor
Copy link
Contributor

izveigor commented Aug 4, 2023

Is your feature request related to a problem or challenge?

Summary

Characteristic Description
Function name: array_repeat
Aliases: list_repeat
Original function?: No
Function Description: Azure DataBricks: Returns an array containing element count times.
SQL Spark: Creates an array containing the first argument repeated the number of times given by the second argument.
Sources: Concept Azure Spark

Examples:

❯ select array_repeat(1, 3);
+---------------------------------+
| array_repeat(Int64(1),Int64(3)) |
+---------------------------------+
| [1, 1, 1]                       |
+---------------------------------+
❯ select array_repeat([1, 2], 2);
+------------------------------------+
| array_repeat(List([1,2]),Int64(2)) |
+------------------------------------+
| [[1, 2], [1, 2]]                   |
+------------------------------------+

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