[ https://issues.apache.org/jira/browse/HIVE-14657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15529021#comment-15529021 ]
Chetna Chaudhari commented on HIVE-14657: ----------------------------------------- Issue is resolved with HIVE-11812 patch. Tested and verified. > datediff function produce different results with timestamp and string > combination > --------------------------------------------------------------------------------- > > Key: HIVE-14657 > URL: https://issues.apache.org/jira/browse/HIVE-14657 > Project: Hive > Issue Type: Bug > Components: Hive > Affects Versions: 0.13.0 > Reporter: Anup > Priority: Minor > > when we use datediff function with string and timestamp type, it produces > different results. > See below queries: > select datediff("2016-08-18 16:48:12", "2016-07-18 12:54:54") from test2; > 31 > select datediff("2016-08-18 16:48:12", date) from test2; > 30 > select datediff("2016-08-18 16:48:12", cast(date as string)) from test2; > 31 > hive> desc test2; > OK > date timestamp > hive> select * from test2; > OK > 2016-07-18 12:54:54 -- This message was sent by Atlassian JIRA (v6.3.4#6332)