hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Dere (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-6208) user-defined aggregate functions cannot be used as windowing function
Date Wed, 15 Jan 2014 21:09:26 GMT

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

Jason Dere commented on HIVE-6208:
----------------------------------

Also should not be getting NPE here if the window function cannot be found.

> user-defined aggregate functions cannot be used as windowing function
> ---------------------------------------------------------------------
>
>                 Key: HIVE-6208
>                 URL: https://issues.apache.org/jira/browse/HIVE-6208
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>            Reporter: Jason Dere
>            Assignee: Jason Dere
>
> Function registry does a pass to register all GenericUDAFs as window functions. However
any aggregate functions added after this (such as a user-added temporary function) don't work
as window functions:
> hive> create temporary function mysum as 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum';
> OK
> Time taken: 0.0050 seconds
> hive> explain select mysum(key) over () from src;                                
              
> FAILED: NullPointerException null
> java.lang.NullPointerException
> 	at org.apache.hadoop.hive.ql.parse.PTFTranslator.translate(PTFTranslator.java:354)
> 	at org.apache.hadoop.hive.ql.parse.PTFTranslator.translate(PTFTranslator.java:194)
> 	at org.apache.hadoop.hive.ql.parse.WindowingComponentizer.next(WindowingComponentizer.java:86)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genWindowingPlan(SemanticAnalyzer.java:10721)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPostGroupByBodyPlan(SemanticAnalyzer.java:7904)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:7862)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:8678)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:8904)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:310)
> 	at org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:65)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:310)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:440)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:340)
> 	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:996)
> 	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1039)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:932)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:922)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:268)
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:220)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:424)
> 	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:792)
> 	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:686)
> 	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
> 	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:212)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message