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

Will Noble commented on CALCITE-6055:
-------------------------------------

Actually, this can be handled fine using the existing 
{{SqlUserDefinedTypeNameSpec}}. We had come up with a fix for this in our local 
branch, but it was still erroneously using {{SqlBasicTypeNameSpec}} for the 
original {{TIMESTAMP}} type name, leading to the complex problem described in 
CALCITE-5636. I should be able to obsolete that ticket in short order as I 
address this one.

> Customize handling of type name based on type system
> ----------------------------------------------------
>
>                 Key: CALCITE-6055
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6055
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Will Noble
>            Priority: Minor
>
> This is very similar to CALCITE-5424, which only applied to literals (e.g. 
> {{TIMESTAMP '2023-10-17 12:00:00'}}). We need a similar solution for [the 
> {{DateTimeTypeName}} 
> construction|https://github.com/apache/calcite/blob/6f79436c178beec639e559d9152c237bbf8ec3e8/core/src/main/codegen/templates/Parser.jj#L6019]
>  which is used in other contexts (e.g. {{CAST('2023-10-17 12:00:00' AS 
> TIMESTAMP)}}). Seems like we can use a very similar approach: introduce a 
> {{SqlUnknownTypeNameSpec}} that's resolved during validation.



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

Reply via email to