[ https://issues.apache.org/jira/browse/HIVE-7027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Navis updated HIVE-7027: ------------------------ Assignee: Navis Status: Patch Available (was: Open) > Hive job fails when referencing a view that explodes an array > ------------------------------------------------------------- > > Key: HIVE-7027 > URL: https://issues.apache.org/jira/browse/HIVE-7027 > Project: Hive > Issue Type: Bug > Components: Query Processor > Reporter: Chaoyu Tang > Assignee: Navis > Attachments: HIVE-7027.1.patch.txt > > > For a table created with following DDL > CREATE TABLE test_issue (fileid int, infos ARRAY<STRUCT<user:INT>>, > test_c STRUCT<user_c:STRUCT<age:INT>>), > create a view that lateral view explodes the array column like > CREATE VIEW v_test_issue AS SELECT fileid, i.user, test_c.user_c.age FROM > test_issue LATERAL VIEW explode(infos) info AS i; > Querying the view such as: > SELECT * FROM v_test_issue WHERE age = 25; > Will failed with following errors: > {code} > java.lang.Exception: java.lang.RuntimeException: Error in configuring object > at > org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:354) > Caused by: java.lang.RuntimeException: Error in configuring object > at > org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:93) > at > org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64) > at > org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117) > at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:426) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:366) > at > org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:223) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) > at java.lang.Thread.run(Thread.java:695) > Caused by: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88) > ... 11 more > Caused by: java.lang.RuntimeException: Error in configuring object > at > org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:93) > at > org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64) > at > org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117) > at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:34) > ... 16 more > Caused by: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88) > ... 19 more > Caused by: java.lang.RuntimeException: Map operator initialization failed > at > org.apache.hadoop.hive.ql.exec.mr.ExecMapper.configure(ExecMapper.java:154) > ... 24 more > Caused by: java.lang.RuntimeException: cannot find field test_c from > [0:_col0, 1:_col5] > at > org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.getStandardStructFieldRef(ObjectInspectorUtils.java:415) > at > org.apache.hadoop.hive.serde2.objectinspector.StandardStructObjectInspector.getStructFieldRef(StandardStructObjectInspector.java:150) > at > org.apache.hadoop.hive.ql.exec.ExprNodeColumnEvaluator.initialize(ExprNodeColumnEvaluator.java:55) > at > org.apache.hadoop.hive.ql.exec.ExprNodeFieldEvaluator.initialize(ExprNodeFieldEvaluator.java:53) > at > org.apache.hadoop.hive.ql.exec.ExprNodeFieldEvaluator.initialize(ExprNodeFieldEvaluator.java:53) > at > org.apache.hadoop.hive.ql.exec.Operator.initEvaluators(Operator.java:934) > at > org.apache.hadoop.hive.ql.exec.Operator.initEvaluatorsAndReturnStruct(Operator.java:960) > at > org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:65) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeOp(Operator.java:401) > at > org.apache.hadoop.hive.ql.exec.LateralViewJoinOperator.initializeOp(LateralViewJoinOperator.java:109) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeOp(Operator.java:401) > at > org.apache.hadoop.hive.ql.exec.UDTFOperator.initializeOp(UDTFOperator.java:94) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416) > at > org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:67) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeOp(Operator.java:401) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416) > at > org.apache.hadoop.hive.ql.exec.FilterOperator.initializeOp(FilterOperator.java:83) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416) > at > org.apache.hadoop.hive.ql.exec.FilterOperator.initializeOp(FilterOperator.java:83) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:460) > at > org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:416) > at > org.apache.hadoop.hive.ql.exec.TableScanOperator.initializeOp(TableScanOperator.java:189) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376) > at > org.apache.hadoop.hive.ql.exec.MapOperator.initializeOp(MapOperator.java:424) > at > org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:376) > at > org.apache.hadoop.hive.ql.exec.mr.ExecMapper.configure(ExecMapper.java:133) > ... 24 more > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)