[zebra] merge join with empty table failed
------------------------------------------

                 Key: PIG-1078
                 URL: https://issues.apache.org/jira/browse/PIG-1078
             Project: Pig
          Issue Type: Bug
            Reporter: Jing Huang


Got indexOutOfBound exception. 

Here is the pig script:
register /grid/0/dev/hadoopqa/jars/zebra.jar;
--a1 = load '1.txt' as (a:int, 
b:float,c:long,d:double,e:chararray,f:bytearray,r1(f1:chararray,f2:chararray),m1:map[]);

--a2 = load 'empty.txt' as (a:int, 
b:float,c:long,d:double,e:chararray,f:bytearray,r1(f1:chararray,f2:chararray),m1:map[]);
--dump a1;

--a1order = order a1 by a;
--a2order = order a2 by a;


--store a1order into 'a1' using 
org.apache.hadoop.zebra.pig.TableStorer('[a,b,c];[d,e,f,r1,m1]');
--store a2order into 'empty' using 
org.apache.hadoop.zebra.pig.TableStorer('[a,b,c];[d,e,f,r1,m1]');

rec1 = load 'a1' using org.apache.hadoop.zebra.pig.TableLoader();
rec2 = load 'empty' using org.apache.hadoop.zebra.pig.TableLoader();
joina = join rec1 by a, rec2 by a using "merge" ;
dump joina;

======
please note that table "a1" and "empty" are created correctly. 

Here is the stack trace:
Backend error message
---------------------
java.lang.ArrayIndexOutOfBoundsException: 0
        at 
org.apache.hadoop.zebra.mapred.TableInputFormat.getTableRecordReader(TableInputFormat.java:478)
        at org.apache.hadoop.zebra.pig.TableLoader.bindTo(TableLoader.java:166)
        at 
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POMergeJoin.seekInRightStream(POMergeJoin.java:400)
        at 
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POMergeJoin.getNext(POMergeJoin.java:181)
        at 
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.runPipeline(PigMapBase.java:247)
        at 
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:238)
        at 
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapOnly$Map.map(PigMapOnly.java:65)
        at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:358)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)
        at org.apache.hadoop.mapred.Child.main(Child.java:159)

Pig Stack Trace
---------------
ERROR 6015: During execution, encountered a Hadoop error.

org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to open 
iterator for alias joina
        at org.apache.pig.PigServer.openIterator(PigServer.java:481)
        at 
org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:539)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:241)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:168)
        at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:144)
        at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:89)
        at org.apache.pig.Main.main(Main.java:386)
Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 6015: 
During execution, encountered a Hadoop error.
        at 
.apache.hadoop.zebra.mapred.TableInputFormat.getTableRecordReader(TableInputFormat.java:478)
        at .apache.hadoop.zebra.pig.TableLoader.bindTo(TableLoader.java:166)
        at 
.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POMergeJoin.seekInRightStream(POMergeJoin.java:400)
        at 
.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POMergeJoin.getNext(POMergeJoin.java:181)
        at 
.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.runPipeline(PigMapBase.java:247)
        at 
.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:238)
        at 
.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapOnly$Map.map(PigMapOnly.java:65)
        at .apache.hadoop.mapred.MapRunner.run(MapRunner.java:50)
        at .apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:358)
        at .apache.hadoop.mapred.MapTask.run(MapTask.java:307)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
        ... 10 more
================================================================================
                                     



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to