Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> NaNs and Infinity support in HIVE?


Copy link to this message
-
Re: NaNs and Infinity support in HIVE?
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.

Mark

----- 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?
Thanks
Nanda Vijaydev
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.

Thanks,
-Sukhendu
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB