ZheHu created CALCITE-5741:
------------------------------

             Summary: Add support for MSSQL CONCAT_WS function
                 Key: CALCITE-5741
                 URL: https://issues.apache.org/jira/browse/CALCITE-5741
             Project: Calcite
          Issue Type: Improvement
          Components: core
    Affects Versions: 1.34.0
            Reporter: ZheHu
            Assignee: ZheHu


CONCAT_WS function in MSSQL has the following syntax:

{code:java}
CONCAT_WS ( separator, argument1, argument2 [, argumentN]... )
{code}

This function returns a string resulting from the concatenation, or joining, of 
two or more string values in an end-to-end manner. It separates those 
concatenated string values with the delimiter specified in the first function 
argument. Moreover, the amount of arguments varies from 3 to 254.

Unlike CONCAT function, CONCAT_WS ignores NULL value, for example:

{code:java}
select concat_ws(',', 'a', 'b', null, null, 'c');
-- result in 'a,b,c'
{code}

For more details, see 
[doc|https://learn.microsoft.com/en-us/sql/t-sql/functions/concat-ws-transact-sql?view=sql-server-ver16].



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to