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

Jason

On Jan 23, 2014, at 6:20 AM, Petter von Dolwitz (Hem) 
<petter.von.dolw...@gmail.com> wrote:

> 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
> 
> 


-- 
CONFIDENTIALITY NOTICE
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.

Reply via email to