phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ramkrishna.s.vasudevan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-1875) implement ARRAY_PREPEND built in function
Date Fri, 08 May 2015 04:33:00 GMT

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

ramkrishna.s.vasudevan commented on PHOENIX-1875:
-------------------------------------------------

Okie, I get it now. You are allowing the oldOffset to be copied for the null cases at the
beginning and the non null ones are added followed by an offset shift. 
Pls add a patch with a comment on this as what is happening here may be with some examples
for better understanding.
{code}
lengthIncrease = nRemainingNulls == 1 ? (nMultiplesOver255 == 0 ? 2 * Bytes.SIZEOF_BYTE :
Bytes.SIZEOF_BYTE) : 0;
{code}
+1 on patch after you add the comment.



> implement ARRAY_PREPEND built in function
> -----------------------------------------
>
>                 Key: PHOENIX-1875
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1875
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Dumindu Buddhika
>            Assignee: Dumindu Buddhika
>         Attachments: PHOENIX-1875-v2.patch, PHOENIX-1875-v3.patch, PHOENIX-1875-v4.patch
>
>
> ARRAY_PREPEND(1, ARRAY[2, 3]) = ARRAY[1, 2, 3]
> ARRAY_PREPEND("a", ARRAY["b", "c"]) = ARRAY["a", "b", "c"]
> ARRAY_PREPEND(null, ARRAY["b", "c"]) = ARRAY[null, "b", "c"]



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

Mime
View raw message