hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Shih (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-320) Issuing queries with COUNT(DISTINCT) on a column that may contain null values hits a NPE
Date Wed, 11 Mar 2009 21:02:50 GMT

    [ https://issues.apache.org/jira/browse/HIVE-320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681026#action_12681026
] 

Ryan Shih commented on HIVE-320:
--------------------------------

I'm generating the input into the schema using a custom serde. I'll work on stripping it down
to get you a test case you can reproduce from but it may take some time. This is still consistently
reproducible for me.

> Issuing queries with COUNT(DISTINCT) on a column that may contain null values hits a
NPE
> ----------------------------------------------------------------------------------------
>
>                 Key: HIVE-320
>                 URL: https://issues.apache.org/jira/browse/HIVE-320
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.2.0, 0.3.0
>            Reporter: Ryan Shih
>            Priority: Blocker
>
> When issuing a query that may contain a null value, I get a NPE. 
> E.g. if 'middle_name' potentially holds null values,
> select count(distinct middle_name) from people; will fail with the below exception.
> Other queries that work with the same input set:
> select distinct middle_name from people;
> select count(1), middle_name from people group by middle_name;
> java.io.IOException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.NullPointerException
> 	at org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java:169)
> 	at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:318)
> 	at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:2198)
> Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.NullPointerException
> 	at org.apache.hadoop.hive.ql.exec.GroupByOperator.process(GroupByOperator.java:424)
> 	at org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java:164)
> 	... 2 more
> Caused by: java.lang.NullPointerException
> 	at org.apache.hadoop.hive.ql.exec.GroupByOperator.updateAggregations(GroupByOperator.java:376)
> 	at org.apache.hadoop.hive.ql.exec.GroupByOperator.processAggr(GroupByOperator.java:477)
> 	at org.apache.hadoop.hive.ql.exec.GroupByOperator.process(GroupByOperator.java:420)
> 	... 3 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message