-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add list_cat, list_concat, list_repeat #942
Conversation
9f47b6b
to
28e677d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This is a nice addition.
I just have the one suggestion to the online documentation.
To concatenate two arrays, you can use the function :py:func:`datafusion.functions.list_cat` or :py:func:`datafusion.functions.list_concat`. | ||
These functions return a new array that is the concatenation of the input arrays. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend we change all references in this file to the array_
versions rather than the list_
versions since I think the primary method is array_
and the list_
version is a convenient alias.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed the list_ references to array_ references.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I’ll wait for CI to pass and then I’ll merge. Nice work on this PR!
* Add list_cat, list_concat * Add list_repeat * docs: add examples for list_cat, list_concat, and list_repeat functions * Amend list_repeat code example - literal * Amend list_ to array_ in documentation
Which issue does this PR close?
Completes 3 tasks in #463
Rationale for this change
This PR adds new functions
list_cat
,list_concat
,list_repeat
.What changes are included in this PR?
Added the
list_cat
,list_concat
,list_repeat
functions.Updated the Python bindings in functions.py and provided unit tests in test_functions.py.
Updated the documentation (expressions.rst) to include examples on how to use the new functions.
Are there any user-facing changes?
The list_cat, list_concat, list_repeat functions are now available for users working with arrays allowing users to concatenate and repeat arrays within their DataFusion queries.
There are no breaking changes to public APIs.