You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "ZheHu (Jira)" <ji...@apache.org> on 2024/12/31 09:43:00 UTC

[jira] [Commented] (CALCITE-6755) Add SUBSTRING function(enabled in MSSQL library)

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

ZheHu commented on CALCITE-6755:
--------------------------------

I'm not sure whether we should add it for such slight difference. But if people apply Calcite default semantics to query SQL Server directly, the above expression will result in failure.
Moreover, test cases don't cover MSSQL library currently, which I think is necessary and helpful.
Any other opinions would be appreciate.

> Add SUBSTRING function(enabled in MSSQL library)
> ------------------------------------------------
>
>                 Key: CALCITE-6755
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6755
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.38.0
>            Reporter: ZheHu
>            Assignee: ZheHu
>            Priority: Minor
>
> SUBSTRING function in SQL Server behaves almost like what in Calcite.
> The only slight difference is the number of arguments. For example, the following expression will throw "The substring function requires 3 argument(s)." in SQL Server, but succeed in Calcite, which means substringLength argument is required for SQL Server.
> {code:java}
> SELECT substring('abcdef', 1)
> {code}



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