You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Dmitry Sysolyatin (Jira)" <ji...@apache.org> on 2022/09/23 11:13:00 UTC

[jira] [Created] (CALCITE-5297) Casting dynamic variable twice throws exception

Dmitry Sysolyatin created CALCITE-5297:
------------------------------------------

             Summary: Casting dynamic variable twice throws exception
                 Key: CALCITE-5297
                 URL: https://issues.apache.org/jira/browse/CALCITE-5297
             Project: Calcite
          Issue Type: Bug
          Components: core
            Reporter: Dmitry Sysolyatin


Executing of {code}SELECT CAST(CAST(? AS INTEGER) AS CHAR){code} query throws exception:

{code}
Conversion to relational algebra failed to preserve datatypes:
validated type:
RecordType(CHAR(1) NOT NULL EXPR$0) NOT NULL
converted type:
RecordType(CHAR(1) EXPR$0) NOT NULL
rel:
LogicalProject(EXPR$0=[CAST(?0):CHAR(1)])
  LogicalValues(tuples=[[{ 0 }]])
{code}

Testcase - https://github.com/apache/calcite/commit/4e32d2997b80effda66d46af06ec376b44856ead



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