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

Szehon Ho commented on HIVE-7635:
---------------------------------

+1, pending test

> Query having same aggregate functions but different case throws 
> IndexOutOfBoundsException
> -----------------------------------------------------------------------------------------
>
>                 Key: HIVE-7635
>                 URL: https://issues.apache.org/jira/browse/HIVE-7635
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.13.1
>            Reporter: Chaoyu Tang
>            Assignee: Chaoyu Tang
>             Fix For: 0.14.0
>
>         Attachments: HIVE-7635.1.patch, HIVE-7635.patch
>
>
> A query having same aggregate functions (e.g. count) but in different case  
> does not work and throws IndexOutOfBoundsException.
> {code}
> Query:
> SELECT key, COUNT(value) FROM src GROUP BY key HAVING count(value) >= 4
> ---
> Error log:
> 14/08/06 11:00:45 ERROR ql.Driver: FAILED: IndexOutOfBoundsException Index: 
> 2, Size: 2
> java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
>       at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>       at java.util.ArrayList.get(ArrayList.java:322)
>       at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanReduceSinkOperator(SemanticAnalyzer.java:4173)
>       at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanMapAggrNoSkew(SemanticAnalyzer.java:5165)
>       at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:8337)
>       at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9178)
>       at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:9431)
>       at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:207)
>       at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:414)
>       at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:310)
>       at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1023)
>       at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1088)
>       at org.apache.hadoop.hive.ql.Driver.run(Driver.java:960)
>       at org.apache.hadoop.hive.ql.Driver.run(Driver.java:950)
>       at 
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:265)
>       at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:217)
>       at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:427)
>       at 
> org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:800)
>       at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:694)
>       at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:633)
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to