Gschiavon opened a new pull request #25728: [SPARK-29020][SQL] Improving 
array_sort behaviour
URL: https://github.com/apache/spark/pull/25728
 
 
   ### What changes were proposed in this pull request?
   I've noticed that there are two functions to sort arrays sort_array and 
array_sort.
   
   sort_array is from 1.5.0 and it has the possibility of ordering both 
ascending and descending 
   
   array_sort is from 2.4.0 and it only has the possibility of ordering in 
ascending.
   
   Basically I just added the possibility of ordering either ascending or 
descending using array_sort. 
   
   I think it would be good to have unified behaviours and not having to user 
sort_array when you want to order in descending order. 
   Imagine that you are new to spark, I'd like to be able to sort array using 
the newest spark functions.
   
   
   ### Why are the changes needed?
   Basically to be able to sort the array in descending order using 
*array_sort* instead of using *sort_array* from 1.5.0
   
   ### Does this PR introduce any user-facing change?
   Yes, now you are able to sort the array in descending order. Note that it 
has the same behaviour with nulls than sort_array
   
   
   ### How was this patch tested?
   Test's added
   
   This is the link to the 
[jira](https://issues.apache.org/jira/browse/SPARK-29020)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to