You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "TANG Wen-hui (Jira)" <ji...@apache.org> on 2020/03/19 08:40:00 UTC

[jira] [Updated] (CALCITE-3468) JDBC adapter may generate casts on Oracle for varchar without the precision and for char with the precision exceeding max length of Oracle.

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

TANG Wen-hui updated CALCITE-3468:
----------------------------------
    Summary: JDBC adapter may generate casts on Oracle for varchar without the precision and for char with the precision exceeding max length of Oracle.  (was: Oracle cast to varchar does not use precision when it should)

> JDBC adapter may generate casts on Oracle for varchar without the precision and for char with the precision exceeding max length of Oracle.
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-3468
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3468
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Lindsey Meyer
>            Assignee: TANG Wen-hui
>            Priority: Major
>
> We're trying to cast a node to a varchar with something like this:
> {noformat}
> relBuilder.cast(node, SqlTypeName.VARCHAR)
> {noformat}
> And in Oracle SQL, this generates sql like
> {noformat}
> CAST(node AS VARCHAR){noformat}
> which is incorrect. Oracle can only have VARCHAR types with an explicit precision.
> Looking at the code, it _seems_ like this should work with Oracle, so I'm not really sure what's going on here



--
This message was sent by Atlassian Jira
(v8.3.4#803005)