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

James Taylor commented on PHOENIX-1705:
---------------------------------------

Your patch is looking good. For the null case, you never want to throw a type 
mismatch exception. Instead, just skip the isCoercibleTo check and the 
maxLength check. Keep in mind that a descending sort order inverts all the 
bits, so if you want to look at it as an object (in the debugger or in code), 
you'd need to invert it back. The issue you found with PDataType.pad() is a 
good one. You should add SortOrder as an argument to this method (using 
SortOrder.getDefault() as the default for existing calls) and do the right 
thing in the case of a SortOrder of DESC. Notice we have a 
StringUtil.INVERTED_SPACE_UTF8 which is what would need to be used in the 
Arrays.fill() if sortOrder==SortOrder.DESC in the PChar.pad() call.

[~ramkrishna] is going to be your mentor, so please @ mention him for reviews 
going forward.

> implement ARRAY_APPEND built in function
> ----------------------------------------
>
>                 Key: PHOENIX-1705
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1705
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Dumindu Buddhika
>            Assignee: Dumindu Buddhika
>         Attachments: 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function1.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function10.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function11.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function2.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function3.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function4.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function5.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function6.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function7.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function8.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function9.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to