[ https://issues.apache.org/jira/browse/HIVE-2747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Namit Jain updated HIVE-2747: ----------------------------- Assignee: (was: Kevin Wilfong) > UNION ALL with subquery which selects NULL and performs group by fails > ---------------------------------------------------------------------- > > Key: HIVE-2747 > URL: https://issues.apache.org/jira/browse/HIVE-2747 > Project: Hive > Issue Type: Bug > Reporter: Kevin Wilfong > > Queries like the following > from (select key, value, count(1) as count from src group by key, value union > all select NULL as key, value, count(1) as count from src group by value) a > select count(*); > fail with the exception > java.lang.NullPointerException > at > org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector.toString(StructObjectInspector.java:60) > at java.lang.String.valueOf(String.java:2826) > at java.lang.StringBuilder.append(StringBuilder.java:115) > at > org.apache.hadoop.hive.ql.exec.UnionOperator.initializeOp(UnionOperator.java:110) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:357) > at > org.apache.hadoop.hive.ql.exec.MapOperator.initializeOp(MapOperator.java:427) > at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:357) > at org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:98) > ... 18 more > This should at least provide a more informative error message if not work. > It works without the group by. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira