hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phabricator (JIRA)" <>
Subject [jira] [Commented] (HIVE-2956) [hive] Provide error message when using UDAF in the place of UDF instead of throwing NPE
Date Mon, 07 May 2012 17:52:50 GMT


Phabricator commented on HIVE-2956:

kevinwilfong has commented on the revision "HIVE-2956 [jira] [hive] Provide error message
when using UDAF in the place of UDF instead of throwing NPE".

  I'm sorry, you're right, I misread the error message, partly because I misunderstood the
problem your patch was trying to solve.

  I would argue that Hive should support this syntax, if not now, then eventually.  It is
supported by MySQL for instance.

  However, until this is supported, a proper error message is preferable to an NPE.  The problem
appears to be a combination of applying distinct and a UDAF to the same column.  It seems
to me that a better error message would be something that indicates that.  It is not the location
of sum(key) that is causing the problem, but the fact that distinct key is also in the select
clause.  If you could also add a "yet" in there to suggest that this will be supported in
the future, that would also be good.


> [hive] Provide error message when using UDAF in the place of UDF instead of throwing
> ----------------------------------------------------------------------------------------
>                 Key: HIVE-2956
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Navis
>            Assignee: Navis
>            Priority: Trivial
>         Attachments: HIVE-2956.D2823.1.patch, HIVE-2956.D2823.2.patch
> For example, 
> {code}
> hive> select distinct deptno, sum(deptno) from emp;
> FAILED: Hive Internal Error: java.lang.NullPointerException(null)
> java.lang.NullPointerException
> 	at org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc.newInstance(
> 	at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.getXpathOrFuncExprNodeDesc(
> 	at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.process(
> 	at org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(
> 	at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(
> 	at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.walk(
> 	at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(
> 	at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanMapGroupByOperator(
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanMapAggr1MR(
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(
> {code}
> Trivial.. but people always reports this confused by esoteric custom function names.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message