Laurent Goujon commented on CALCITE-1444:

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.

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?

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.
I'll do.

Also please modify REFERENCE.md.
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

Reply via email to