You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Hussain Towaileb (Jira)" <ji...@apache.org> on 2019/11/26 17:01:00 UTC

[jira] [Updated] (ASTERIXDB-2667) Share code between string functions

     [ https://issues.apache.org/jira/browse/ASTERIXDB-2667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hussain Towaileb updated ASTERIXDB-2667:
----------------------------------------
    Summary: Share code between string functions  (was: Add support to CONCAT2 function)

> Share code between string functions
> -----------------------------------
>
>                 Key: ASTERIXDB-2667
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2667
>             Project: Apache AsterixDB
>          Issue Type: Improvement
>          Components: FUN - Functions
>    Affects Versions: 0.9.4.1
>            Reporter: Hussain Towaileb
>            Assignee: Hussain Towaileb
>            Priority: Major
>             Fix For: 0.9.5
>
>
> CONCAT2 is similar to CONCAT function, which simply a string concatenation of all the provided parameters, however, it allows specifying a separator to be used between the concatenated strings as a first argument, and accepts arrays of strings that get flatted and concatenated.
>  
> If a single argument only is provided with the separator, then the separator is not used, and only a single string is returned.
>  
> Examples:
> {code:java}
>  concat2("-", "1", "2")        -> "1-2"
>  concat2("-", "1", ["2", "3"]) -> "1-2-3"
>  concat2("-", "1")             -> "1"
>  concat2("-", ["1"])           -> "1"
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)