You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Anoop Sharma (JIRA)" <ji...@apache.org> on 2016/05/25 00:10:12 UTC
[jira] [Created] (TRAFODION-2013) Hive null values for string
datatype are not being handled correctly
Anoop Sharma created TRAFODION-2013:
---------------------------------------
Summary: Hive null values for string datatype are not being handled correctly
Key: TRAFODION-2013
URL: https://issues.apache.org/jira/browse/TRAFODION-2013
Project: Apache Trafodion
Issue Type: Bug
Reporter: Anoop Sharma
Assignee: Anoop Sharma
During reads, by default, a string of length zero in a hive file should be treated as a null value for non-string datatypes, and should be treated as string of length zero for string datatypes. A string of '\N' should be
treated as null value for string datatypes.
Similarly, during writes, a non-string datatype null should be written out
as an empty string and a string datatype null value should be written out as '\N'.
In Traf, during reads, a string of length zero is being returned as a null value for string datatypes. It is however, being correctly returned as a null value for non-string datatypes.
And during writes, a null value is being written out as a string of length zero for string datatypes.
examples of incorrect behavior:
from hive:
create table t (a string);
from sqlci:
insert into t values (null), ('a'), ('');
from hive:
hive> select * from t;
OK
t.a
a
Time taken: 0.358 seconds, Fetched: 3 row(s)
Returns 3 rows with null row being written out as string of length zero.
From sqlci:
>>select * from hive.hive.t;
A
----------
?
a
?
--- 3 row(s) selected.
2 rows with string of length zero are being returned as null rows.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)