Uh oh!
There was an error while loading. Please reload this page.
[SPARK-39925][SQL] Add array_sort(column, comparator) overload to DataFrame operations - #37361
[SPARK-39925][SQL] Add array_sort(column, comparator) overload to DataFrame operations#37361brandondahler wants to merge 1 commit into
Conversation
AmplabJenkins
commented
Aug 1, 2022
Can one of the admins verify this patch? |
HyukjinKwon
left a comment
There was a problem hiding this comment.
LGTM. are you also interested in adding this in SparkR and PySpark? We can do that in a separate PR.
brandondahler
commented
Aug 18, 2022
I do think they should be added (I checked that they aren't already there), but I don't personally have availability to do so at this time. |
HyukjinKwon
commented
Aug 18, 2022
Oops, it slipped through my fingers. Mind retriggering https://github.com/brandondahler/spark/runs/7585897593? |
HyukjinKwon
commented
Aug 18, 2022
cc @zero323, @itholic, @zhengruifeng FYI (since we need to add PySpark and SparkR ones) |
brandondahler
commented
Aug 18, 2022
Clicked re-run all jobs on that linked run, let me know if there was something else you meant for me to do |
since otherwise, LGTM |
zero323
commented
Aug 18, 2022
It seems like it has to be re-synced with upstream, to address black failures. |
49743ea to
72d799bComparebrandondahler
commented
Aug 20, 2022
Rebased on lastest master changes |
HyukjinKwon
commented
Aug 21, 2022
Merged to master. |
What changes were proposed in this pull request?
Adding a new
array_sortoverload toorg.apache.spark.sql.functionsthat matches the new overload defined in SPARK-29020 and added via #25728.Why are the changes needed?
Adds access to the new overload for users of the DataFrame API so that they don't need to use the
exprescape hatch.Does this PR introduce any user-facing change?
Yes, now allows users to optionally provide a comparator function to the
array_sort, which opens up the ability to sort descending as well as sort items that aren't naturally orderable.Example:
Old:
Added:
How was this patch tested?
Unit tests updated to validate that the overload matches the expression's behavior.