hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Navis Ryu" <navis....@nexr.com>
Subject Review Request 18177: uncorrelated subquery is failing with auto.convert.join=true
Date Mon, 17 Feb 2014 02:28:03 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18177/
-----------------------------------------------------------

Review request for hive.


Bugs: HIVE-6403
    https://issues.apache.org/jira/browse/HIVE-6403


Repository: hive-git


Description
-------

Fixing HIVE-5690, I've found query in subquery_multiinsert.q is not working with hive.auto.convert.join=true

{noformat}
set hive.auto.convert.join=true;
hive> explain
    > from src b 
    > INSERT OVERWRITE TABLE src_4 
    >   select * 
    >   where b.key in 
    >    (select a.key 
    >     from src a 
    >     where b.value = a.value and a.key > '9'
    >    ) 
    > INSERT OVERWRITE TABLE src_5 
    >   select *  
    >   where b.key not in  ( select key from src s1 where s1.key > '2') 
    >   order by key 
    > ;
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.rangeCheck(ArrayList.java:635)
	at java.util.ArrayList.get(ArrayList.java:411)
	at org.apache.hadoop.hive.ql.optimizer.MapJoinProcessor.genMapJoinLocalWork(MapJoinProcessor.java:149)
	at org.apache.hadoop.hive.ql.optimizer.MapJoinProcessor.genLocalWorkForMapJoin(MapJoinProcessor.java:256)
	at org.apache.hadoop.hive.ql.optimizer.MapJoinProcessor.genMapJoinOpAndLocalWork(MapJoinProcessor.java:248)
	at org.apache.hadoop.hive.ql.optimizer.physical.CommonJoinTaskDispatcher.convertTaskToMapJoinTask(CommonJoinTaskDispatcher.java:191)
	at org.apache.hadoop.hive.ql.optimizer.physical.CommonJoinTaskDispatcher.processCurrentTask(CommonJoinTaskDispatcher.java:481)
	at org.apache.hadoop.hive.ql.optimizer.physical.AbstractJoinTaskDispatcher.dispatch(AbstractJoinTaskDispatcher.java:182)
	at org.apache.hadoop.hive.ql.lib.TaskGraphWalker.dispatch(TaskGraphWalker.java:111)
	at org.apache.hadoop.hive.ql.lib.TaskGraphWalker.walk(TaskGraphWalker.java:194)
	at org.apache.hadoop.hive.ql.lib.TaskGraphWalker.startWalking(TaskGraphWalker.java:139)
	at org.apache.hadoop.hive.ql.optimizer.physical.CommonJoinResolver.resolve(CommonJoinResolver.java:79)
	at org.apache.hadoop.hive.ql.optimizer.physical.PhysicalOptimizer.optimize(PhysicalOptimizer.java:100)
	at org.apache.hadoop.hive.ql.parse.MapReduceCompiler.optimizeTaskPlan(MapReduceCompiler.java:290)
	at org.apache.hadoop.hive.ql.parse.TaskCompiler.compile(TaskCompiler.java:216)
	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:9167)
	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:327)
	at org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:64)
	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:327)
	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:446)
	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:346)
	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1056)
	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1099)
	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:992)
	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:982)
	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:793)
	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:687)
	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:626)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
org.apache.hadoop.hive.ql.parse.SemanticException: Failed to generate new mapJoin operator
by exception : Index: 0, Size: 0
	at org.apache.hadoop.hive.ql.optimizer.MapJoinProcessor.genLocalWorkForMapJoin(MapJoinProcessor.java:266)
	at org.apache.hadoop.hive.ql.optimizer.MapJoinProcessor.genMapJoinOpAndLocalWork(MapJoinProcessor.java:248)
	at org.apache.hadoop.hive.ql.optimizer.physical.CommonJoinTaskDispatcher.convertTaskToMapJoinTask(CommonJoinTaskDispatcher.java:191)
	at org.apache.hadoop.hive.ql.optimizer.physical.CommonJoinTaskDispatcher.processCurrentTask(CommonJoinTaskDispatcher.java:481)
	at org.apache.hadoop.hive.ql.optimizer.physical.AbstractJoinTaskDispatcher.dispatch(AbstractJoinTaskDispatcher.java:182)
	at org.apache.hadoop.hive.ql.lib.TaskGraphWalker.dispatch(TaskGraphWalker.java:111)
	at org.apache.hadoop.hive.ql.lib.TaskGraphWalker.walk(TaskGraphWalker.java:194)
	at org.apache.hadoop.hive.ql.lib.TaskGraphWalker.startWalking(TaskGraphWalker.java:139)
	at org.apache.hadoop.hive.ql.optimizer.physical.CommonJoinResolver.resolve(CommonJoinResolver.java:79)
	at org.apache.hadoop.hive.ql.optimizer.physical.PhysicalOptimizer.optimize(PhysicalOptimizer.java:100)
	at org.apache.hadoop.hive.ql.parse.MapReduceCompiler.optimizeTaskPlan(MapReduceCompiler.java:290)
	at org.apache.hadoop.hive.ql.parse.TaskCompiler.compile(TaskCompiler.java:216)
	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:9167)
	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:327)
	at org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:64)
	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:327)
	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:446)
	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:346)
	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1056)
	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1099)
	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:992)
	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:982)
	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:793)
	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:687)
	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:626)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:160)
FAILED: SemanticException Generate Map Join Task Error: Failed to generate new mapJoin operator
by exception : Index: 0, Size: 0
{noformat}


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java 9caf79e 
  ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java c5bbe68 
  ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java cc840be 
  ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java d2aa220 
  ql/src/java/org/apache/hadoop/hive/ql/optimizer/MapJoinProcessor.java b4aeb14 
  ql/src/java/org/apache/hadoop/hive/ql/optimizer/correlation/CorrelationOptimizer.java 3595640

  ql/src/java/org/apache/hadoop/hive/ql/optimizer/correlation/CorrelationUtilities.java 98fcff5

  ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/CommonJoinTaskDispatcher.java 74ca355

  ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MapJoinResolver.java 82a833e 
  ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/SortMergeJoinTaskDispatcher.java
f4cd3ab 
  ql/src/java/org/apache/hadoop/hive/ql/plan/ConditionalResolverCommonJoin.java 5c3a582 
  ql/src/test/org/apache/hadoop/hive/ql/plan/TestConditionalResolverCommonJoin.java c9b0cf0

  ql/src/test/queries/clientpositive/subquery_multiinsert.q 1f65b16 
  ql/src/test/results/clientpositive/auto_join12.q.out bf7990c 
  ql/src/test/results/clientpositive/auto_join25.q.out 9fe6049 
  ql/src/test/results/clientpositive/auto_join29.q.out 0dd84ff 
  ql/src/test/results/clientpositive/auto_join3.q.out 8c5fc02 
  ql/src/test/results/clientpositive/multiMapJoin2.q.out c59a407 
  ql/src/test/results/clientpositive/subquery_multiinsert.q.out fdafea3 

Diff: https://reviews.apache.org/r/18177/diff/


Testing
-------


Thanks,

Navis Ryu


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message