Anup created HIVE-14657:
---------------------------

             Summary: 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)

Reply via email to