You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "ramkrishna.s.vasudevan (JIRA)" <ji...@apache.org> on 2015/07/27 07:51:04 UTC
[jira] [Commented] (PHOENIX-2147) Implement STRING_TO_ARRAY built
in function
[ https://issues.apache.org/jira/browse/PHOENIX-2147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14642302#comment-14642302 ]
ramkrishna.s.vasudevan commented on PHOENIX-2147:
-------------------------------------------------
{code}
array = string.split("(?!^)");
{code}
What does this expression mean? Suppose the string is "1 2 3 4". There is no delimiter and nullString. So this wil yield {1,2,3,4}? Also all the array are of type String only right? We don't have a function that will convert a string to an Int arry?
The test cases testStringToArrayFunction16 to testStringToArrayFunction19 have some reptitions I think. Pls check it.
Great work [~Dumindux].
> Implement STRING_TO_ARRAY built in function
> -------------------------------------------
>
> Key: PHOENIX-2147
> URL: https://issues.apache.org/jira/browse/PHOENIX-2147
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Dumindu Buddhika
> Assignee: Dumindu Buddhika
> Attachments: PHOENIX-2147_v1.patch, PHOENIX-2147_v2.patch
>
>
> Splits string into array elements using supplied delimiter and optional null string and returns the resulting varchar array
> Example: STRING_TO_ARRAY('wx^yy^zz', '^', 'yy') → {'wx',NULL,'zz'}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)