You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Remus Rusanu (JIRA)" <ji...@apache.org> on 2014/02/12 12:53:19 UTC

[jira] [Created] (HIVE-6412) SMB join on Decimal columns causes caste exception in JoinUtil.computeKeys

Remus Rusanu created HIVE-6412:
----------------------------------

             Summary: SMB join on Decimal columns causes caste exception in JoinUtil.computeKeys
                 Key: HIVE-6412
                 URL: https://issues.apache.org/jira/browse/HIVE-6412
             Project: Hive
          Issue Type: Bug
            Reporter: Remus Rusanu
            Priority: Critical


Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.serde2.io.HiveDecimalWritable cannot be cast to org.apache.hadoop.hive.common.type.HiveDecimal
        at org.apache.hadoop.hive.serde2.objectinspector.primitive.JavaHiveDecimalObjectInspector.getPrimitiveWritableObject(JavaHiveDecimalObjectInspector.java:49)
        at org.apache.hadoop.hive.serde2.objectinspector.primitive.JavaHiveDecimalObjectInspector.getPrimitiveWritableObject(JavaHiveDecimalObjectInspector.java:27)
        at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.copyToStandardObject(ObjectInspectorUtils.java:281)
        at org.apache.hadoop.hive.ql.exec.JoinUtil.computeKeys(JoinUtil.java:143)
        at org.apache.hadoop.hive.ql.exec.SMBMapJoinOperator$MergeQueue.next(SMBMapJoinOperator.java:809)
        at org.apache.hadoop.hive.ql.exec.SMBMapJoinOperator$MergeQueue.nextHive(SMBMapJoinOperator.java:771)
        at org.apache.hadoop.hive.ql.exec.SMBMapJoinOperator$MergeQueue.setupContext(SMBMapJoinOperator.java:710)
        at org.apache.hadoop.hive.ql.exec.SMBMapJoinOperator.setUpFetchContexts(SMBMapJoinOperator.java:538)
        at org.apache.hadoop.hive.ql.exec.SMBMapJoinOperator.processOp(SMBMapJoinOperator.java:248)
        at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:790)
        at org.apache.hadoop.hive.ql.exec.TableScanOperator.processOp(TableScanOperator.java:92)
        at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:790)
        at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:524)


Repro:
create table vsmb_bucket_1(key decimal(9,0), value decimal(38,10)) 
  CLUSTERED BY (key) 
  SORTED BY (key) INTO 1 BUCKETS 
  STORED AS ORC;
create table vsmb_bucket_2(key decimal(19,3), value decimal(28,0)) 
  CLUSTERED BY (key) 
  SORTED BY (key) INTO 1 BUCKETS 
  STORED AS ORC;
  
insert into table vsmb_bucket_1 
  select cast(cint as decimal(9,0)) as key, 
    cast(cfloat as decimal(38,10)) as value 
  from alltypesorc limit 2;
insert into table vsmb_bucket_2 
  select cast(cint as decimal(19,3)) as key, 
    cast(cfloat as decimal(28,0)) as value 
  from alltypesorc limit 2;

set hive.optimize.bucketmapjoin = true;
set hive.optimize.bucketmapjoin.sortedmerge = true;
set hive.auto.convert.sortmerge.join.noconditionaltask = true;
set hive.input.format = org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat;

explain
select /*+MAPJOIN(a)*/ * from vsmb_bucket_1 a join vsmb_bucket_2 b on a.key = b.key;
select /*+MAPJOIN(a)*/ * from vsmb_bucket_1 a join vsmb_bucket_2 b on a.key = b.key;



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)