hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "caofangkun (JIRA)" <>
Subject [jira] [Created] (HIVE-3945) union all datatype do not match may result wrong result
Date Fri, 25 Jan 2013 09:31:15 GMT
caofangkun created HIVE-3945:

             Summary: union all datatype do not match may result wrong result 
                 Key: HIVE-3945
             Project: Hive
          Issue Type: Bug
          Components: Query Processor
    Affects Versions: 0.9.0
            Reporter: caofangkun
            Priority: Minor

hive (default)> desc src;
key	string	
value	string	

select key, value FROM 
( select 'key' as key, 'value' as value         -- datatype: string, string
  from src s1 limit 1
  select s2.key as key, sum(s2.value) as value  -- datatype: strung, double 
  from src s2 group by s2.key
 ) unionsrc;
this query exec normally but has wrong result:
key	2.4081029415476845E-282    -- expected is 'value'
100	100.0
48	0.0

and sometimes when the string title is too long it may case ArrayIndexOutOfBoundsException:

Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryString.init(
at org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryStruct.uncheckedGetField(
at org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryStruct.getField(
at org.apache.hadoop.hive.serde2.lazybinary.objectinspector.LazyBinaryStructObjectInspector.getStructFieldData(
at org.apache.hadoop.hive.ql.exec.UnionOperator.processOp(
at org.apache.hadoop.hive.ql.exec.Operator.process(
at org.apache.hadoop.hive.ql.exec.Operator.forward(
at org.apache.hadoop.hive.ql.exec.MapOperator.process(

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message