You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2023/06/10 20:28:00 UTC

[jira] [Commented] (CALCITE-5741) Add support for MSSQL CONCAT_WS function

    [ https://issues.apache.org/jira/browse/CALCITE-5741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17731271#comment-17731271 ] 

Julian Hyde commented on CALCITE-5741:
--------------------------------------

As part of this change, we should change the behavior of the CONCAT function in the Postgres library. It currently behaves like MySQL and BigQuery but it should behave like Oracle (i.e. ignore null arguments).

> 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
>            Priority: Minor
>
> 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)