[ https://issues.apache.org/jira/browse/CALCITE-5636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated CALCITE-5636: ------------------------------------ Labels: pull-request-available (was: ) > Consult type mappings when coercing types. > ------------------------------------------ > > Key: CALCITE-5636 > URL: https://issues.apache.org/jira/browse/CALCITE-5636 > Project: Calcite > Issue Type: Improvement > Components: core > Reporter: Will Noble > Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > This is another offshoot of CALCITE-5346. > In > [{{AbstractTypeCoercion.implicitCast}}|https://github.com/apache/calcite/blob/2dba40e7a0a5651eac5a30d9e0a72f178bd9bff2/core/src/main/java/org/apache/calcite/sql/validate/implicit/AbstractTypeCoercion.java#L713], > Calcite may insert {{CAST}} invocations disregarding the root schema type > map. This happens during the validation phase, so it's easy enough to read > the type map directly in the {{AbstractTypeCoercion}} utility, although it's > hard to say if this is an optimal solution. It may make sense to incorporate > the type map into the {{RelDataTypeSystem}} which is more widely available in > non-validation phases of SQL processing pipelines. -- This message was sent by Atlassian Jira (v8.20.10#820010)