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

MinJi Kim edited comment on CALCITE-1312 at 7/12/16 6:48 PM:
-------------------------------------------------------------

Thanks for the review.  I made the changes you suggested.  Also, while adding 
the tests to SqlOperatorBaseTest, I noticed a few other problems (especially in 
timestampdiff with null dates).  So, I also made those fixes in this patch.  I 
also updated the jira.  Thanks again!


was (Author: minjikim):
Thanks for the review.  I made the changes you suggested.  Also, while adding 
the tests to SqlOperatorBaseTest, I noticed a few other problems (especially in 
timestampdiff with null dates).  So, I also made those fixes in this patch.  I 
also updated the jira.

> timestamp_add(UNIT, DATE) should return timestamp if the unit added is less 
> than a date, timestamp_diff should handle null dates
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-1312
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1312
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: MinJi Kim
>            Assignee: Julian Hyde
>
> timestamp_add("MINUTE", 1, date '2016-06-15') returns 2016-06-15 since it 
> returns a date and therefore truncates the minute informtion.  timestamp_add 
> should return timestamp instead of date for units less than date.
> timestamp_diff with date doesn't handle null properly (in type inference), 
> converted type is INTEGER NOT NULL (when it should be null).



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

Reply via email to