hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chao (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-9655) Dynamic partition table insertion error
Date Wed, 11 Feb 2015 20:58:15 GMT
Chao created HIVE-9655:
--------------------------

             Summary: Dynamic partition table insertion error
                 Key: HIVE-9655
                 URL: https://issues.apache.org/jira/browse/HIVE-9655
             Project: Hive
          Issue Type: Bug
          Components: Logical Optimizer
    Affects Versions: 1.1
            Reporter: Chao


We have these two tables:

{code}
create table t1 (c1 bigint, c2 string);

CREATE TABLE t2 (c1 int, c2 string)
PARTITIONED BY (p1 string);

load data local inpath 'data' into table t1;
load data local inpath 'data' into table t1;
load data local inpath 'data' into table t1;
load data local inpath 'data' into table t1;
load data local inpath 'data' into table t1;
{code}

But, when try to insert into table t2 from t1:
{code}
SET hive.exec.dynamic.partition.mode=nonstrict;
insert overwrite table t2_avro partition(p1) select *,c1 as p1 from t1 distribute by p1;
{code}

The query failed with the following exception:

{noformat}
2015-02-11 12:50:52,756 ERROR [LocalJobRunner Map Task Executor #0]: mr.ExecMapper (ExecMapper.java:map(178))
- org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
{"c1":1,"c2":"one"}
  at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:503)
  at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.map(ExecMapper.java:170)
  at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
  at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:450)
  at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
  at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:243)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: cannot
find field _col2 from [0:_col0, 1:_col1]
  at org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.processOp(ReduceSinkOperator.java:397)
  at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:815)
  at org.apache.hadoop.hive.ql.exec.SelectOperator.processOp(SelectOperator.java:84)
  at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:815)
  at org.apache.hadoop.hive.ql.exec.TableScanOperator.processOp(TableScanOperator.java:95)
  at org.apache.hadoop.hive.ql.exec.MapOperator$MapOpCtx.forward(MapOperator.java:157)
  at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:493)
  ... 10 more
Caused by: java.lang.RuntimeException: cannot find field _col2 from [0:_col0, 1:_col1]
  at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.getStandardStructFieldRef(ObjectInspectorUtils.java:410)
  at org.apache.hadoop.hive.serde2.objectinspector.StandardStructObjectInspector.getStructFieldRef(StandardStructObjectInspector.java:147)
  at org.apache.hadoop.hive.ql.exec.ExprNodeColumnEvaluator.initialize(ExprNodeColumnEvaluator.java:55)
  at org.apache.hadoop.hive.ql.exec.Operator.initEvaluators(Operator.java:954)
  at org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.processOp(ReduceSinkOperator.java:325)
  ... 16 more
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message