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

Julian Hyde commented on CALCITE-2614:
--------------------------------------

What are the advantages of doing this in {{convertDatetimePlusToTimestampAdd}} 
versus in {{RexSimplify}}?

Are datetime calculations like {{ts - interval '1' hour - interval '2' hour}} 
significantly more common than the numeric equivalent, {{x - 5 - 10}}? If not, 
we should handle both simplifications the same way.

> Converting datetime_plus to timestampadd should be done recursively
> -------------------------------------------------------------------
>
>                 Key: CALCITE-2614
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2614
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: James Duong
>            Assignee: Julian Hyde
>            Priority: Major
>
> The method in RexUtil convertDatetimePlusToTimestampAdd() should handle the 
> case where the timestamp operand is another call to Datetime_plus. (eg SELECT 
> <date_column> - interval '1' hour - interval '1' hour)
> This can be impemented by having the datetime operand accept the same visitor.



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

Reply via email to