hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phabricator (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-2332) If all of the parameters of distinct functions are exists in group by columns, query fails in runtime
Date Thu, 08 Dec 2011 18:01:46 GMT

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

Phabricator updated HIVE-2332:
------------------------------

    Attachment: HIVE-2332.D663.1.patch

njain requested code review of "HIVE-2332 [jira] If all of the parameters of distinct functions
are exists in group by columns, query fails in runtime".
Reviewers: JIRA

  HIVE-2332

  select sum(key_int1), sum(distinct key_int1) from t1 group by key_int1;

  fails with message..  <div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent"> <pre class="code-java">FAILED: Execution Error, <span class="code-keyword">return</span>
code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask</pre> </div></div>

  hadoop says..  <div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent"> <pre class="code-java">Caused by: java.lang.IndexOutOfBoundsException:
Index: 1, Size: 1 	at java.util.ArrayList.RangeCheck(ArrayList.java:547) 	at java.util.ArrayList.get(ArrayList.java:322)
	at org.apache.hadoop.hive.serde2.objectinspector.StandardStructObjectInspector.init(StandardStructObjectInspector.java:95)
	at org.apache.hadoop.hive.serde2.objectinspector.StandardStructObjectInspector.(StandardStructObjectInspector.java:86)
	at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory.getStandardStructObjectInspector(ObjectInspectorFactory.java:252)
	at org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.initEvaluatorsAndReturnStruct(ReduceSinkOperator.java:188)
	at org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.processOp(ReduceSinkOperator.java:197)
	at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:471) 	at org.apache.hadoop.hive.ql.e
 xec.Operator.forward(Operator.java:744) 	at org.apache.hadoop.hive.ql.exec.TableScanOperator.processOp(TableScanOperator.java:85)
	at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:471) 	at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:744)
	at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:532)</pre> </div></div>

  I think the deficient number of key expression, compared to number of key column, is the
problem, which should be equal or more.
  Would it be solved if add some key expression? I'll try.

TEST PLAN
  EMPTY

REVISION DETAIL
  https://reviews.facebook.net/D663

AFFECTED FILES
  ql/src/test/results/clientpositive/groupby_distinct_samekey.q.out
  ql/src/test/queries/clientpositive/groupby_distinct_samekey.q
  ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
  ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java

MANAGE HERALD DIFFERENTIAL RULES
  https://reviews.facebook.net/herald/view/differential/

WHY DID I GET THIS EMAIL?
  https://reviews.facebook.net/herald/transcript/1473/

Tip: use the X-Herald-Rules header to filter Herald messages in your client.

                
> If all of the parameters of distinct functions are exists in group by columns, query
fails in runtime
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2332
>                 URL: https://issues.apache.org/jira/browse/HIVE-2332
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Navis
>            Assignee: Navis
>            Priority: Critical
>             Fix For: 0.9.0
>
>         Attachments: HIVE-2332.1.patch.txt, HIVE-2332.2.patch.txt, HIVE-2332.D663.1.patch
>
>
> select sum(key_int1), sum(distinct key_int1) from t1 group by key_int1;
> fails with message..
> {code}
> FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask
> {code}
> hadoop says..
> {code}
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> 	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
> 	at java.util.ArrayList.get(ArrayList.java:322)
> 	at org.apache.hadoop.hive.serde2.objectinspector.StandardStructObjectInspector.init(StandardStructObjectInspector.java:95)
> 	at org.apache.hadoop.hive.serde2.objectinspector.StandardStructObjectInspector.(StandardStructObjectInspector.java:86)
> 	at org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory.getStandardStructObjectInspector(ObjectInspectorFactory.java:252)
> 	at org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.initEvaluatorsAndReturnStruct(ReduceSinkOperator.java:188)
> 	at org.apache.hadoop.hive.ql.exec.ReduceSinkOperator.processOp(ReduceSinkOperator.java:197)
> 	at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:471)
> 	at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:744)
> 	at org.apache.hadoop.hive.ql.exec.TableScanOperator.processOp(TableScanOperator.java:85)
> 	at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:471)
> 	at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:744)
> 	at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:532)
> {code}
> I think the deficient number of key expression, compared to number of key column, is
the problem, which should be equal or more. 
> Would it be solved if add some key expression? I'll try.

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

        

Mime
View raw message