Mihai Budiu created CALCITE-7582:
------------------------------------

             Summary: 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


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