You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Corinne Chandel (JIRA)" <ji...@apache.org> on 2011/02/11 22:27:59 UTC

[jira] Resolved: (PIG-859) Optimizer throw error on self-joins

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

Corinne Chandel resolved PIG-859.
---------------------------------

    Resolution: Fixed

Docs updated. Self-Joins section added to JOIN(inner). Patch will be submitted under Pig-1772.

> Optimizer throw error on self-joins
> -----------------------------------
>
>                 Key: PIG-859
>                 URL: https://issues.apache.org/jira/browse/PIG-859
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.3.0
>            Reporter: Ashutosh Chauhan
>            Assignee: Corinne Chandel
>             Fix For: 0.9.0
>
>
> Doing self-join results in exception thrown by Optimizer. Consider the following query
> {code}
> grunt> A = load 'a';
> grunt> B = Join A by $0, A by $0;
> grunt> explain B;
> 2009-06-20 15:51:38,303 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1094: Attempt to insert between two nodes that were not connected.
> Details at logfile: pig_1245538027026.log
> {code}
> Relevant stack-trace from log-file:
> {code}
> Caused by: org.apache.pig.impl.plan.optimizer.OptimizerException: ERROR
> 2047: Internal error. Unable to introduce split operators.
>         at
> org.apache.pig.impl.logicalLayer.optimizer.ImplicitSplitInserter.transform(ImplicitSplitInserter.java:163)
>         at
> org.apache.pig.impl.logicalLayer.optimizer.LogicalOptimizer.optimize(LogicalOptimizer.java:163)
>         at org.apache.pig.PigServer.compileLp(PigServer.java:844)
>         at org.apache.pig.PigServer.compileLp(PigServer.java:781)
>         at org.apache.pig.PigServer.getStorePlan(PigServer.java:723)
>         at org.apache.pig.PigServer.explain(PigServer.java:566)
>         ... 8 more
> Caused by: org.apache.pig.impl.plan.PlanException: ERROR 1094: Attempt
> to insert between two nodes that were not connected.
>         at
> org.apache.pig.impl.plan.OperatorPlan.doInsertBetween(OperatorPlan.java:500)
>         at
> org.apache.pig.impl.plan.OperatorPlan.insertBetween(OperatorPlan.java:480)
>         at
> org.apache.pig.impl.logicalLayer.optimizer.ImplicitSplitInserter.transform(ImplicitSplitInserter.java:139)
>         ... 13 more
> {code}
> A possible workaround is:
> {code}
> grunt> A = load 'a';
> grunt> B = load 'a';
> grunt> C = join A by $0, B by $0;
> grunt> explain C;
> {code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira