hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chinna <chinna...@huawei.com>
Subject Query on retrieving data using smallint datatype
Date Mon, 01 Aug 2011 14:29:11 GMT
Hi,

I have a query. I have execute the following statements

  1. create table test(a smallint,b tinyint,c int,d bouble) row format
delimeted fields terminated by'@';
  2. load data local inpath '/home/data/input.txt' into table test;
  3. select a,b from test;

But one of my Input data record is:
40000@300@10000@4000.00

This data record appeared due to a special scenario/bug in the application.
So the values exceeded the given data type.

The Output returned by Hive is :   null, null

Means, when the data size exceeds the data type range, Hive is returning
NULL values. From code I can see this is explicitly implemented to do this
way. 

Can any one explain why we choose to return NULL instead of this can we
throw an exception or rotate the value

Thanks&Regards,
Chinna Rao Lalam


Mime
View raw message