[ https://issues.apache.org/jira/browse/HIVE-20318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryu Kobayashi updated HIVE-20318: --------------------------------- Attachment: HIVE-20318.01.patch Status: Patch Available (was: In Progress) This problem is caused by HIVE-16227. The problem is the case of SELECT instead of multi-insert as above. > NullPointerException when union with lateral view > ------------------------------------------------- > > Key: HIVE-20318 > URL: https://issues.apache.org/jira/browse/HIVE-20318 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 3.1.1, 3.1.0, 2.3.2, 3.0.0 > Environment: Run on MR, hadoop 2.7.3 and Tez > Reporter: Wang Yan > Assignee: Ryu Kobayashi > Priority: Blocker > Attachments: HIVE-20318.01.patch > > > The following sql throws NullPointerException. > This sql is not table/data specific and can be run directly. > {code:sql} > WITH > t1 AS (SELECT 0 AS c1), > t2 AS ( > SELECT 0 AS c1 > FROM ( > SELECT COLLECT_SET('line') AS c2 > ) t3 lateral VIEW explode(ARRAY("a")) er AS c3 > ) > SELECT c1 > FROM t1 > UNION ALL > SELECT c1 > FROM t2 > {code} > This is the exception. > {code:java} > 2018-04-20 01:53:50,845 WARN [Thread-5] org.apache.hadoop.mapred.YarnChild: > Exception running child : java.lang.RuntimeException: Hive Runtime Error > while closing operators > at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.close(ExecMapper.java:207) > at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:61) > at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343) > at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) > at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) > Caused by: java.lang.NullPointerException > at org.apache.hadoop.hive.conf.HiveConf.getVar(HiveConf.java:3901) > at > org.apache.hadoop.hive.ql.exec.FileSinkOperator.closeOp(FileSinkOperator.java:1020) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:697) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:711) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:711) > at org.apache.hadoop.hive.ql.exec.Operator.close(Operator.java:711) > at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.close(ExecMapper.java:189) > ... 8 more > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)