phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dumindu Buddhika (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-1705) implement ARRAY_APPEND built in function
Date Mon, 09 Mar 2015 02:04:38 GMT


Dumindu Buddhika commented on PHOENIX-1705:

[~jamestaylor], [~sergey.b] Thank you very much for the feedback.

Hi, I think ARRAY_APPEND should not handle the case where the appending element itself is
an array. If you look at PostgreSQL array functions They have a separate function for concatenating
two arrays called ARRAY_CAT,

If we concatenate two arrays in the ARRAY_APPEND function it carries a wrong meaning,

For example if someone use the function in the following way,

ARRAY_APPEND(array[1,2,3], array [4,5])

He is expecting a result like this,


But since we do not support multi-dimensional arrays(to my knowledge) we shouldn't handle
this case here.

I think a separate ARRAY_CAT built in function should be implemented for concatenation of

What do you think about that?

[~jamestaylor] I will remove the copying of bytes to a new array and improve the function
to support variable length arrays. Thanks for the info on coerceBytes :). 
I am not very clear about the third point. So should we check types in the constructor of
ArrayAppendFunction class? 

at here,
public ArrayAppendFunction(List<Expression> children) throws SQLException {


> implement ARRAY_APPEND built in function
> ----------------------------------------
>                 Key: PHOENIX-1705
>                 URL:
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Dumindu Buddhika
>            Assignee: Dumindu Buddhika
>         Attachments: PHOENIX-1705_implement_ARRAY_APPEND_built_in_function.patch

This message was sent by Atlassian JIRA

View raw message