You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/07/13 02:58:20 UTC

[jira] [Resolved] (CALCITE-1312) Return type of TIMESTAMP_ADD applied to a DATE should be TIMESTAMP if unit is smaller than DAY

     [ https://issues.apache.org/jira/browse/CALCITE-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde resolved CALCITE-1312.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.9.0

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/db6a3b3b. Thanks for the PR, [~minjikim]!

> Return type of TIMESTAMP_ADD applied to a DATE should be TIMESTAMP if unit is smaller than DAY
> ----------------------------------------------------------------------------------------------
>
>                 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
>             Fix For: 1.9.0
>
>
> 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)