You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2016/11/22 22:53:58 UTC

[jira] [Resolved] (HIVE-14923) DATE and TIMESTAMP comparisons do not work

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

Ashutosh Chauhan resolved HIVE-14923.
-------------------------------------
       Resolution: Fixed
         Assignee: Ashutosh Chauhan
    Fix Version/s: 2.2.0

Fixed via HIVE-15236

> DATE and TIMESTAMP comparisons do not work
> ------------------------------------------
>
>                 Key: HIVE-14923
>                 URL: https://issues.apache.org/jira/browse/HIVE-14923
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>            Reporter: Matt McCline
>            Assignee: Ashutosh Chauhan
>            Priority: Critical
>             Fix For: 2.2.0
>
>
> When comparing a DATE type with a TIMESTAMP type, the planner promotes both sides to string.  But since the DATE value does not include the hh:mm:ss[.nnnnnnnnn] the comparison produces wrong results.
> Thanks to Jason Dere for observing this.
> Here is a portion of an EXPLAIN output:
> {code}
>                       Map Join Operator
>                         condition map:
>                              Inner Join 0 to 1
>                         keys:
>                           0 UDFToString(some_timestamp) (type: string)
>                           1 UDFToString(some_date) (type: string)
> {code}
> Workaround is to cast the DATE to a TIMESTAMP.



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