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

[jira] [Commented] (CALCITE-6565) Invalid unparse for CHAR without precision in MssqlSqlDialect

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

xiong duan commented on CALCITE-6565:
-------------------------------------

Fixed in [15f4ef98618e|https://github.com/apache/calcite/commit/15f4ef98618e66e7e5cc70128dc0f7a7e6cb135c]. Thanks for the PR [~chengjie]. Thanks for the review [~mbudiu]. Please remember to log a new Jira issue to describe the PR and make the commit info consistent with [CALCITE-****].

> Invalid unparse for CHAR without precision in MssqlSqlDialect
> -------------------------------------------------------------
>
>                 Key: CALCITE-6565
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6565
>             Project: Calcite
>          Issue Type: Improvement
>    Affects Versions: 1.37.0
>            Reporter: xiong duan
>            Priority: Major
>
> Execute SQL :
> {code:java}
> select cast(product_id as char) from product
> {code}
> Expected Mssql SQL should be:
> {code:java}
> SELECT CAST([product_id] AS CHAR) FROM [foodmart].[product]
> {code}
> But is:
> {code:java}
> SELECT CAST([product_id] AS CHAR(1)) FROM [foodmart].[product]
> {code}



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