[ https://issues.apache.org/jira/browse/CALCITE-5297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jess Balint closed CALCITE-5297. -------------------------------- Resolved in release 1.33.0 (2023-02-06) > 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 > Assignee: Dmitry Sysolyatin > Priority: Major > Labels: pull-request-available > Fix For: 1.33.0 > > Time Spent: 1.5h > Remaining Estimate: 0h > > 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)