You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Will Noble (Jira)" <ji...@apache.org> on 2023/04/06 22:12:00 UTC
[jira] [Created] (CALCITE-5635) Consult type mappings when coercing types.
Will Noble created CALCITE-5635:
-----------------------------------
Summary: Consult type mappings when coercing types.
Key: CALCITE-5635
URL: https://issues.apache.org/jira/browse/CALCITE-5635
Project: Calcite
Issue Type: Improvement
Components: core
Reporter: Will Noble
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)