hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tucker, Matt" <>
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 []
Sent: Thursday, March 15, 2012 2:06 AM
Subject: Float equality comparison in Hive:


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.


View raw message