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

Thomas D'Silva commented on PHOENIX-4644:
-----------------------------------------

+1 LGTM

I don't think we have tests for this. ARRAY_PREPEND(null, ARRAY[1,2,3]) and 
ARRAY_CAT(null, ARRAY[1,2,3]) currently fail with a NPE :

{code}
Caused by: java.lang.NullPointerException
        at 
org.apache.phoenix.expression.function.ArrayModifierFunction.<init>(ArrayModifierFunction.java:44)
        at 
org.apache.phoenix.expression.function.ArrayConcatFunction.<init>(ArrayConcatFunction.java:44)
        ... 51 more
{code}



> Array modification functions should require two arguments
> ---------------------------------------------------------
>
>                 Key: PHOENIX-4644
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4644
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: James Taylor
>            Priority: Major
>             Fix For: 4.14.0
>
>         Attachments: PHOENIX-4644_v1.patch
>
>
> ARRAY_APPEND, ARRAY_PREPEND, and ARRAY_CAT should require two arguments. 
> Also, if the second argument is null, we need to make sure not to have the 
> entire expression return null (but instead it should return the first 
> argument). To accomplish this, we need to have a ParseNode that overrides the 
> method controlling this and ensure it's used for these functions.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to