[
https://issues.apache.org/jira/browse/PHOENIX-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14626094#comment-14626094
]
ramkrishna.s.vasudevan commented on PHOENIX-2101:
-------------------------------------------------
Went thro the patch. Looks great. Nice tests and coverage.
Small nits
{code}
if (!(!nullExpr.evaluate(tuple, ptr) || ptr.getLength() == 0)) {
{code}
This condition can be changed to make it more readable?
Any better name for this
{code}
pending = false;
{code}
Here
{code}
if (nullString != null || array.getElement(i + 1) != null && pending) {
{code}
Make it
{code}
if (nullString != null || (array.getElement(i + 1) != null && pending)) {
{code}
for better reabability. Rest looks good to me.
> Implement ARRAY_TO_STRING built in function
> -------------------------------------------
>
> Key: PHOENIX-2101
> URL: https://issues.apache.org/jira/browse/PHOENIX-2101
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Dumindu Buddhika
> Assignee: Dumindu Buddhika
> Attachments: PHOENIX-2101-v1.patch
>
>
> ARRAY_TO_STRING(anyarray, text [, text]) - Concatenates array elements using
> supplied delimiter and optional null string and returns the resulting string
> eg:
> ARRAY_TO_STRING(ARRAY['1', '2, '3', NULL, '5'], ',', 'k') → '1,2,3,k,5'
> ARRAY_TO_STRING(ARRAY[23, 34, 45], ',') → '23,34,45'
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)