hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dere <>
Subject Re: Usage of TIMESTAMP
Date Fri, 24 Jan 2014 19:15:48 GMT
See HIVE-2558 - the comparison between timestamp and string was done by converting both values
to a number.
i think this behavior should be changed, as of Hive-0.12


On Jan 23, 2014, at 6:20 AM, Petter von Dolwitz (Hem) <>

> Hi,
> I have a table where one column (ts) is of type TIMESTAMP. How am I supposed to use this
in my query?
> The following attempt does not give me a result.
> SELECT * FROM mytable WHERE ts > "2014-01-23 00:00:00";
> If I change it to the below it works:
> SELECT * FROM mytable WHERE ts > cast("2014-01-23 00:00:00" as TIMESTAMP);
> Shouldn't Hive (0.10) convert the string for me without the need of an explicit cast?
> Thanks,
> Petter

NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

View raw message