[ https://issues.apache.org/jira/browse/PHOENIX-2147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14642320#comment-14642320 ]
Dumindu Buddhika commented on PHOENIX-2147: ------------------------------------------- Thanks for the review [~ram_krish] {quote} 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] {quote} This splits the string by each character. Here it will yield ARRAY["1", " ", "2", " ", "3", " ", "4"]. This is the behavior in postgres. {quote} 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? {quote} Yeah. This will convert the incoming string to varchar array. {quote} The test cases testStringToArrayFunction16 to testStringToArrayFunction19 have some reptitions I think {quote} Those tests has different input data types(Varchar and Char) here {code} test(string, delimiter, nullString, expected, SortOrder.ASC, SortOrder.ASC, SortOrder.ASC, PChar.INSTANCE, PChar.INSTANCE, PVarchar.INSTANCE); {code} and {code} test(string, delimiter, nullString, expected, SortOrder.ASC, SortOrder.ASC, SortOrder.ASC, PChar.INSTANCE, PChar.INSTANCE, PChar.INSTANCE); {code} > 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)