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

jirapos...@reviews.apache.org commented on HIVE-1399:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2146/#review2625
-----------------------------------------------------------



ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java
<https://reviews.apache.org/r/2146/#comment5933>

    Need a better error message here since
    
    (a) this validation rule applies to builtin aggregate function such as SUM 
also (so we should just refer to "aggregate functions" rather than UDAF's)
    
    (b) this error message also shows up if you try to use an aggregate 
function in the WHERE clause (or anywhere other than SELECT/HAVING)
    
    So either we need to discriminate the two contexts, or else come up with a 
wording that covers both without causing confusion.
    


- John


On 2011-10-02 22:54:26, Adam Fokken wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/2146/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-10-02 22:54:26)
bq.  
bq.  
bq.  Review request for hive.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  HIVE-1399 - fix for null pointer with nested UDAFs
bq.  
bq.  
bq.  This addresses bug HIVE-1399.
bq.      https://issues.apache.org/jira/browse/HIVE-1399
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    ql/src/java/org/apache/hadoop/hive/ql/parse/ErrorMsg.java 2798eaa 
bq.    ql/src/java/org/apache/hadoop/hive/ql/parse/TypeCheckProcFactory.java 
0fd4eb9 
bq.    ql/src/test/queries/clientnegative/udaf_not_supported1.q e69de29 
bq.    ql/src/test/results/clientnegative/udaf_not_supported1.q.out e69de29 
bq.  
bq.  Diff: https://reviews.apache.org/r/2146/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Adam
bq.  
bq.


                
> Nested UDAFs cause Hive Internal Error (NullPointerException)
> -------------------------------------------------------------
>
>                 Key: HIVE-1399
>                 URL: https://issues.apache.org/jira/browse/HIVE-1399
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.6.0
>            Reporter: Mayank Lahiri
>            Assignee: Adam Fokken
>         Attachments: HIVE-1399.1.patch.txt
>
>
> This query does not make "real-world" sense, and I'm guessing it's not even 
> supported by HQL/SQL, but I'm pretty sure that it shouldn't be causing an 
> internal error with a NullPointerException. "normal" just has one column 
> called "val". I'm running on trunk, svn updated 5 minutes ago, ant clean 
> package.
> SELECT percentile(val, percentile(val, 0.5)) FROM normal;
> FAILED: Hive Internal Error: java.lang.NullPointerException(null)
> java.lang.NullPointerException
>       at 
> org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc.newInstance(ExprNodeGenericFuncDesc.java:153)
>       at 
> org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.getXpathOrFuncExprNodeDesc(TypeCheckProcFactory.java:587)
>       at 
> org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.process(TypeCheckProcFactory.java:708)
>       at 
> org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:89)
>       at 
> org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:88)
>       at 
> org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.walk(DefaultGraphWalker.java:128)
>       at 
> org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:102)
>       at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:6241)
>       at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanMapGroupByOperator(SemanticAnalyzer.java:2301)
>       at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanMapAggr1MR(SemanticAnalyzer.java:2860)
>       at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:5002)
>       at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:5524)
>       at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:6055)
>       at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:126)
>       at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:304)
>       at org.apache.hadoop.hive.ql.Driver.run(Driver.java:377)
>       at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:138)
>       at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:197)
>       at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:303)
>       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.RunJar.main(RunJar.java:156)
> I've also recreated this error with a GenericUDAF I'm writing, and also with 
> the following:
> SELECT percentile(val, percentile()) FROM normal;   
> SELECT avg(variance(dob_year)) FROM somedata;     // this makes no sense, but 
> still a NullPointerException

--
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

        

Reply via email to