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

Laurent Goujon commented on CALCITE-1444:
-----------------------------------------

{quote}
In Parser.jj, you would reduce redundancy by assigning to a SqlTypeName 
variable rather than a SqlIdentifier. Make it more compact, like the 
TimestampInterval function.
{quote}

do you mean just returning {{SqlTypeName}} for {{JdbcOdbcType}} and 
{{OdbcIntervalType}}. It seems there's no function to create a SqlDataTypeSpec 
out of a typename, nor can you use an interval type with {{SqlDataTypeSpec}}, 
so I still end up having two functions (one for non-interval types, and one for 
interval types), and I still need to create an instance of {{SqlDataTypeSpec}} 
out of the type name. Did I miss something?

{quote}
Please add one or two tests to SqlParserTest. (SqlOperatorTest is fine, but 
it's more of a system test.) Also add one or two negative tests.
{quote}
I'll do.

{quote}
Also please modify REFERENCE.md.
{quote}
I guess I missed updating the tables for the scalar functions

> 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