hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tucker, Matt" <Matt.Tuc...@disney.com>
Subject RE: Float equality comparison in Hive:
Date Fri, 16 Mar 2012 14:00:55 GMT
Hi Shiree,

You might also try 'WHERE round(A, 1) = 3.5' as your filter.

Matt Tucker

From: shireesha chandra [mailto:shireeshachandra@gmail.com]
Sent: Thursday, March 15, 2012 2:06 AM
To: user@hive.apache.org
Subject: Float equality comparison in Hive:

Hi,

I am new to Hive. Just wanted a small clarification on the Float equality comparison.
For instance, to check if A is equal to 3.5, is the usage of "A>3.49 and A<3.51" in
the WHERE clause of SELECT statement correct. Or do I have to use the following:
"(NOT (A<3.5) AND NOT(A>3.5))"
What is the standard procedure for float comparison?

Any pointers is greatly appreciated.

Thanks,
-Shiree

Mime
View raw message