[ 
https://issues.apache.org/jira/browse/HIVE-2279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13182421#comment-13182421
 ] 

Phabricator commented on HIVE-2279:
-----------------------------------

cwsteinbach has commented on the revision "HIVE-2279 [jira] Implement 
sort(array) UDF".

INLINE COMMENTS
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFSortArray.java:47 
This should be
  value="_FUNC_(array)"

  Otherwise, the output of "describe function sort_array" looks like this:

  sort_array(sort_array(obj1, obj2,...)) - Sorts the input...
                  ^^^^^^^^
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFSortArray.java:51 
Please change the example to something simpler that doesn't involve corporate 
names, e.g. "array(4, 1, 3, 2)"
  ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java:449 I think 
the name should be changed to "sort" and "GenericUDFSort". In the future we may 
want to extend it so that it can also support sorting the elements in an input 
string. In a similar manner we may want to implement a "reverse" UDF that 
reverse the elements of an array as well as the characters in a string.
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFSortArray.java:74 
"Argument 1" instead of "Argument " + 1 + ...
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFSortArray.java:88 
There's a single argument, right?

REVISION DETAIL
  https://reviews.facebook.net/D1125

                
> Implement sort(array) UDF
> -------------------------
>
>                 Key: HIVE-2279
>                 URL: https://issues.apache.org/jira/browse/HIVE-2279
>             Project: Hive
>          Issue Type: New Feature
>          Components: UDF
>            Reporter: Carl Steinbach
>            Assignee: Zhenxiao Luo
>         Attachments: HIVE-2279.D1059.1.patch, HIVE-2279.D1101.1.patch, 
> HIVE-2279.D1107.1.patch, HIVE-2279.D1125.1.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to