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

Julian Hyde commented on CALCITE-1444:
--------------------------------------

No, {{JdbcOdbcType}} and {{OdbcIntervalType}} should still return 
{{SqlDataTypeSpec}}. You can just make their internal logic more concise. Note 
that the pattern 'typeName = new SqlIdentifier(SqlTypeName.xxx.name(), pos);' 
occurs many times, so refactor it by introducing an internal function that 
returns a SqlTypeName.

In OdbcIntervalType, introduce an internal function that returns a 
TimeUnitRange. It has a start and an end TimeUnit.

The logic will be the same as what you've written, but fewer lines of code to 
maintain.

> I guess I missed updating the tables for the scalar functions

Yes, you missed https://calcite.apache.org/docs/reference.html#system

> Add support for CONVERT scalar function
> ---------------------------------------
>
>                 Key: CALCITE-1444
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1444
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Laurent Goujon
>            Assignee: Julian Hyde
>
> Both ODBC and JDBC spec mention a {{CONVERT}} scalar function, which is the 
> equivalent of the {{CAST}} function.
> In order for JDBC and ODBC drivers to expose support for this function, 
> calcite should support parsing it, and converting it into a {{CAST}} 
> expression (currently, it doesn't unlike some other scalar functions).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to