Add list_cat, list_concat, list_repeat#942
Merged
timsaucer merged 5 commits intoapache:mainfrom Nov 12, 2024
Merged
Conversation
9f47b6b to
28e677d
Compare
timsaucer
requested changes
Nov 8, 2024
Member
timsaucer
left a comment
There was a problem hiding this comment.
Thank you! This is a nice addition.
I just have the one suggestion to the online documentation.
Comment on lines
+113
to
+114
| 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. |
Member
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
I have changed the list_ references to array_ references.
Member
There was a problem hiding this comment.
Thank you! I’ll wait for CI to pass and then I’ll merge. Nice work on this PR!
timsaucer
approved these changes
Nov 12, 2024
kosiew
added a commit
to kosiew/datafusion-python
that referenced
this pull request
Nov 19, 2024
* 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_repeatfunctions.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.