[ 
https://issues.apache.org/jira/browse/CALCITE-5636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17711064#comment-17711064
 ] 

Julian Hyde commented on CALCITE-5636:
--------------------------------------

I am skeptical that this is a bug. The type mappings should only apply when 
going from a type name to a type. Any code that already has a type (object) 
should not need to consult the mapping.

Also, don't end the summary (or commit messages) with a '.'.

> 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
>
> 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)

Reply via email to