hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chinna Rao Lalam (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-2145) NPE during parsing order-by expression
Date Mon, 12 Sep 2011 17:38:09 GMT

     [ https://issues.apache.org/jira/browse/HIVE-2145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chinna Rao Lalam updated HIVE-2145:
-----------------------------------

    Status: Patch Available  (was: Open)

> NPE during parsing order-by expression
> --------------------------------------
>
>                 Key: HIVE-2145
>                 URL: https://issues.apache.org/jira/browse/HIVE-2145
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Ning Zhang
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-2145.patch
>
>
> The following query throws NPE, where it should have throw parsing exception. 
> hive> select key, count(1) cnt from src group by key order by count(1) limit 10;
> select key, count(1) cnt from src group by key order by count(1) limit 10;
> 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:640)
> 	at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory$DefaultExprProcessor.process(TypeCheckProcFactory.java:761)
> 	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:125)
> 	at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:102)
> 	at org.apache.hadoop.hive.ql.parse.TypeCheckProcFactory.genExprNode(TypeCheckProcFactory.java:156)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:6830)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:6788)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genReduceSinkPlan(SemanticAnalyzer.java:4303)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:5461)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:6022)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:6607)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:340)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:790)
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:209)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:286)
> 	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:514)
> 	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)
> Correct syntax should be: 
> hive> select key, count(1) cnt from src group by key order by cnt limit 10;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message