hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Szehon Ho (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-11737) IndexOutOfBounds compiling query with duplicated groupby keys
Date Fri, 04 Sep 2015 20:18:45 GMT

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

Szehon Ho commented on HIVE-11737:
----------------------------------

Thanks for the fix, looks good, wondering any way to make a unit test?

> IndexOutOfBounds compiling query with duplicated groupby keys
> -------------------------------------------------------------
>
>                 Key: HIVE-11737
>                 URL: https://issues.apache.org/jira/browse/HIVE-11737
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Jimmy Xiang
>            Assignee: Jimmy Xiang
>             Fix For: 1.3.0, 2.0.0
>
>         Attachments: HIVE-11737.1.patch
>
>
> {noformat}
> SELECT
> tinyint_col_7,
> MIN(timestamp_col_1) AS timestamp_col,
> MAX(LEAST(CAST(COALESCE(int_col_5, -279) AS int), CAST(COALESCE(tinyint_col_7, 476) AS
int))) AS int_col,
> tinyint_col_7 AS int_col_1,
> LEAST(CAST(COALESCE(int_col_5, -279) AS int), CAST(COALESCE(tinyint_col_7, 476) AS int))
AS int_col_2
> FROM table_3
> GROUP BY
> tinyint_col_7,
> tinyint_col_7,
> LEAST(CAST(COALESCE(int_col_5, -279) AS int), CAST(COALESCE(tinyint_col_7, 476) AS int))
> {noformat}
> Query compilation fails:
> {noformat}
> Caused by: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
> 	at java.util.ArrayList.rangeCheck(ArrayList.java:635)
> 	at java.util.ArrayList.get(ArrayList.java:411)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanReduceSinkOperator(SemanticAnalyzer.java:4633)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genGroupByPlanMapAggrNoSkew(SemanticAnalyzer.java:5630)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:8987)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9864)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:9757)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:10193)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10204)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10121)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:222)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:421)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:305)
> 	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1110)
> 	at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1104)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message