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

Hussain Towaileb updated ASTERIXDB-2667:
----------------------------------------
    Description: 
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}

  was:Add support to CONCAT2 function


> Add support to CONCAT2 function
> -------------------------------
>
>                 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)

Reply via email to