Gschiavon commented on issue #25728: [SPARK-29020][SQL] Improving array_sort 
behaviour
URL: https://github.com/apache/spark/pull/25728#issuecomment-529977320
 
 
   > @ueshin yeah I agree, the bigger question is, why do we have both 
`array_sort` and `sort_array`?
   > 
   > @kiszk looks like you added `array_sort` to match Presto in 
https://issues.apache.org/jira/browse/SPARK-23921 . Presto supports a 
comparator function rather than an ascending flag.
   > 
   > If `sort_array` does what we want already, and is the older method here, 
why not make `array_sort` an alias for it? We could deprecate one, but which 
one? `sort_array` has been around longer, but `array_sort` is at least the name 
in one other system.
   > 
   > Overall I'd just like to avoid duplicating the implementation, at least, 
even if both are supported as the function name.
   
   @srowen we couldn't make an alias between sort_array and array_sort because 
they don't have the same null policy, it would change the behaviour of 
array_sort.
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to