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

Julian Hyde commented on CALCITE-2339:
--------------------------------------

Looks basically good:
 * missing MINUTE from the switch
 * I don't think the visitor can throw FoundOne
 * only call the method if the condition is not null, do not check for nulls in 
the method, and assume the method returns not-null
 * indentation is off in a couple of places
 * need some unit tests
 * rather than trying to do constant reduction to convert interval to integer, 
could you just use "cast(<interval expression> AS INTEGER)"? less code to 
maintain

> JDBC adapter should transform timestamp arithmetic for target database 
> -----------------------------------------------------------------------
>
>                 Key: CALCITE-2339
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2339
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>            Priority: Major
>         Attachments: Datetime Addition - Calcite.pdf
>
>
> JDBC adapter should transform timestamp arithmetic for target database.
> There are two ways in Calcite to add intervals to timestamps: the 
> TIMESTAMP_ADD function and the "<timestamp> + <interval>" operator.
> The attached document (authored by James Doung) describes their pros and cons.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to