-Re: NaNs and Infinity support in HIVE?
Mark Grover 2012-05-18, 01:50
I did a test for this.
If a NaN is inserted into a string column, the value is serialized as "Infinity" in HDFS. However, if it's inserted into an Integer column, it's serialized as 2147483647 or -2147483648 depending on whether the output is +infinity or -infinity.
----- Original Message -----
From: "Nanda Vijaydev" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Thursday, May 17, 2012 8:10:45 PM
Subject: Re: NaNs and Infinity support in HIVE?
Can you paste a sample line of your data on HDFS and which column you are trying to query?
On Mon, May 14, 2012 at 11:40 AM, Sukhendu Chakraborty < [EMAIL PROTECTED] > wrote:
Are NaNs and/or Infinity supported in HIVE? If yes, I wanted to know
how are NaNs and Infinity values represented in HDFS files to be
interpreted correctly in Hive.
When I do 'select 1/0 from tab', I get a text value, "Infinity".
However, when I enter "Infinity" v in my HDFS file represented by the
HIVE table (the column datatype of the table is int), and then do a
select, I get 'NULL' (and not Infinity).
I am working with HIVE 0.7.1.