[ 
https://issues.apache.org/jira/browse/CALCITE-7582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mihai Budiu resolved CALCITE-7582.
----------------------------------
    Fix Version/s: 1.43.0
         Assignee: Mihai Budiu
       Resolution: Fixed

Fixed in 
[https://github.com/apache/calcite/commit/4c2b6d2df7eb0b38fe3090b11b82e105dc2def0a]

Thank you to the reviewers [~caicancai] [~jensen] [~xuzifu666] 

> Type validation errors should use SQL type names
> ------------------------------------------------
>
>                 Key: CALCITE-7582
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7582
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.42.0
>            Reporter: Mihai Budiu
>            Assignee: Mihai Budiu
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.43.0
>
>
> Today a type validation error could produce a message like:
> {code:java}
>  From line 2, column 1 to line 2, column 83: Cannot apply 'CONTAINS' to 
> arguments of type '<RECORDTYPE:PEEK_NO_EXPAND(DATE EXPR$0, DATE EXPR$1)> 
> CONTAINS <TIME(0)>'. Supported form(s): '(<DT>, <DT>) CONTAINS (<DT>, <DT>)'
> '(<DT>, <DT>) CONTAINS (<DT>, <INTERVAL>)'
> '(<DT>, <INTERVAL>) CONTAINS (<DT>, <DT>)'
> '(<DT>, <INTERVAL>) CONTAINS (<DT>, <INTERVAL>)'
> '(<DT>, <DT>) CONTAINS <DT>'
> '(<DT>, <INTERVAL>) CONTAINS <DT>'
> Where 'DT' is one of 'DATE', 'TIME', or 'TIMESTAMP', the same for all 
> arguments.{code}
> Note how this contains RECORDTYPE:PEEK_NO_EXPAND, which makes no sense for 
> the user. The message should use the SQL type name, not the internal 
> implementation type name.



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

Reply via email to