You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2009/11/06 01:19:32 UTC

[jira] Created: (PIG-1073) LogicalPlanCloner can't clone plan containing LOJoin

LogicalPlanCloner can't clone plan containing LOJoin
----------------------------------------------------

                 Key: PIG-1073
                 URL: https://issues.apache.org/jira/browse/PIG-1073
             Project: Pig
          Issue Type: Bug
          Components: impl
            Reporter: Ashutosh Chauhan


Add following testcase in LogicalPlanBuilder.java

public void testLogicalPlanCloner() throws CloneNotSupportedException{
        LogicalPlan lp = buildPlan("C = join ( load 'A') by $0, (load 'B') by $0;");
        LogicalPlanCloner cloner = new LogicalPlanCloner(lp);
        cloner.getClonedPlan();
    }

and this fails with the following stacktrace:

java.lang.NullPointerException
        at org.apache.pig.impl.logicalLayer.LOVisitor.visit(LOVisitor.java:171)
        at org.apache.pig.impl.logicalLayer.PlanSetter.visit(PlanSetter.java:63)
        at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:213)
        at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:45)
        at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:67)
        at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:69)
        at org.apache.pig.impl.plan.DepthFirstWalker.walk(DepthFirstWalker.java:50)
        at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
        at org.apache.pig.impl.logicalLayer.LogicalPlanCloneHelper.getClonedPlan(LogicalPlanCloneHelper.java:73)
        at org.apache.pig.impl.logicalLayer.LogicalPlanCloner.getClonedPlan(LogicalPlanCloner.java:46)
        at org.apache.pig.test.TestLogicalPlanBuilder.testLogicalPlanCloneHelper(TestLogicalPlanBuilder.java:2110)

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


[jira] Assigned: (PIG-1073) LogicalPlanCloner can't clone plan containing LOJoin

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan reassigned PIG-1073:
-------------------------------------

    Assignee: Ashutosh Chauhan

> LogicalPlanCloner can't clone plan containing LOJoin
> ----------------------------------------------------
>
>                 Key: PIG-1073
>                 URL: https://issues.apache.org/jira/browse/PIG-1073
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>            Reporter: Ashutosh Chauhan
>            Assignee: Ashutosh Chauhan
>         Attachments: pig-1073.patch
>
>
> Add following testcase in LogicalPlanBuilder.java
> public void testLogicalPlanCloner() throws CloneNotSupportedException{
>         LogicalPlan lp = buildPlan("C = join ( load 'A') by $0, (load 'B') by $0;");
>         LogicalPlanCloner cloner = new LogicalPlanCloner(lp);
>         cloner.getClonedPlan();
>     }
> and this fails with the following stacktrace:
> java.lang.NullPointerException
>         at org.apache.pig.impl.logicalLayer.LOVisitor.visit(LOVisitor.java:171)
>         at org.apache.pig.impl.logicalLayer.PlanSetter.visit(PlanSetter.java:63)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:213)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:45)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:67)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:69)
>         at org.apache.pig.impl.plan.DepthFirstWalker.walk(DepthFirstWalker.java:50)
>         at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloneHelper.getClonedPlan(LogicalPlanCloneHelper.java:73)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloner.getClonedPlan(LogicalPlanCloner.java:46)
>         at org.apache.pig.test.TestLogicalPlanBuilder.testLogicalPlanCloneHelper(TestLogicalPlanBuilder.java:2110)

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


[jira] Commented: (PIG-1073) LogicalPlanCloner can't clone plan containing LOJoin

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12775109#action_12775109 ] 

Ashutosh Chauhan commented on PIG-1073:
---------------------------------------

Current patch only partially fixes the problem. It seems we have bigger problems in a way visiting is done on query plans currently. I am working on fixing those.

> LogicalPlanCloner can't clone plan containing LOJoin
> ----------------------------------------------------
>
>                 Key: PIG-1073
>                 URL: https://issues.apache.org/jira/browse/PIG-1073
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>            Reporter: Ashutosh Chauhan
>            Assignee: Ashutosh Chauhan
>         Attachments: pig-1073.patch
>
>
> Add following testcase in LogicalPlanBuilder.java
> public void testLogicalPlanCloner() throws CloneNotSupportedException{
>         LogicalPlan lp = buildPlan("C = join ( load 'A') by $0, (load 'B') by $0;");
>         LogicalPlanCloner cloner = new LogicalPlanCloner(lp);
>         cloner.getClonedPlan();
>     }
> and this fails with the following stacktrace:
> java.lang.NullPointerException
>         at org.apache.pig.impl.logicalLayer.LOVisitor.visit(LOVisitor.java:171)
>         at org.apache.pig.impl.logicalLayer.PlanSetter.visit(PlanSetter.java:63)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:213)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:45)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:67)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:69)
>         at org.apache.pig.impl.plan.DepthFirstWalker.walk(DepthFirstWalker.java:50)
>         at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloneHelper.getClonedPlan(LogicalPlanCloneHelper.java:73)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloner.getClonedPlan(LogicalPlanCloner.java:46)
>         at org.apache.pig.test.TestLogicalPlanBuilder.testLogicalPlanCloneHelper(TestLogicalPlanBuilder.java:2110)

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


[jira] Commented: (PIG-1073) LogicalPlanCloner can't clone plan containing LOJoin

Posted by "Santhosh Srinivasan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774147#action_12774147 ] 

Santhosh Srinivasan commented on PIG-1073:
------------------------------------------

If my memory serves me correctly, the logical plan cloning was implemented (by me) for cloning inner plans for foreach. As such, the top level plan cloning was never tested and some items are marked as TODO (see visit methods for LOLoad, LOStore and LOStream).

If you want to use it as you mention in your test cases, then you need to add code for cloning the LOLoad, LOStore, LOStream and LOJoin operators.


> LogicalPlanCloner can't clone plan containing LOJoin
> ----------------------------------------------------
>
>                 Key: PIG-1073
>                 URL: https://issues.apache.org/jira/browse/PIG-1073
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>            Reporter: Ashutosh Chauhan
>
> Add following testcase in LogicalPlanBuilder.java
> public void testLogicalPlanCloner() throws CloneNotSupportedException{
>         LogicalPlan lp = buildPlan("C = join ( load 'A') by $0, (load 'B') by $0;");
>         LogicalPlanCloner cloner = new LogicalPlanCloner(lp);
>         cloner.getClonedPlan();
>     }
> and this fails with the following stacktrace:
> java.lang.NullPointerException
>         at org.apache.pig.impl.logicalLayer.LOVisitor.visit(LOVisitor.java:171)
>         at org.apache.pig.impl.logicalLayer.PlanSetter.visit(PlanSetter.java:63)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:213)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:45)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:67)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:69)
>         at org.apache.pig.impl.plan.DepthFirstWalker.walk(DepthFirstWalker.java:50)
>         at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloneHelper.getClonedPlan(LogicalPlanCloneHelper.java:73)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloner.getClonedPlan(LogicalPlanCloner.java:46)
>         at org.apache.pig.test.TestLogicalPlanBuilder.testLogicalPlanCloneHelper(TestLogicalPlanBuilder.java:2110)

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


[jira] Updated: (PIG-1073) LogicalPlanCloner can't clone plan containing LOJoin

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated PIG-1073:
----------------------------------

    Attachment: pig-1073.patch

Draft patch with testcase.

> LogicalPlanCloner can't clone plan containing LOJoin
> ----------------------------------------------------
>
>                 Key: PIG-1073
>                 URL: https://issues.apache.org/jira/browse/PIG-1073
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>            Reporter: Ashutosh Chauhan
>         Attachments: pig-1073.patch
>
>
> Add following testcase in LogicalPlanBuilder.java
> public void testLogicalPlanCloner() throws CloneNotSupportedException{
>         LogicalPlan lp = buildPlan("C = join ( load 'A') by $0, (load 'B') by $0;");
>         LogicalPlanCloner cloner = new LogicalPlanCloner(lp);
>         cloner.getClonedPlan();
>     }
> and this fails with the following stacktrace:
> java.lang.NullPointerException
>         at org.apache.pig.impl.logicalLayer.LOVisitor.visit(LOVisitor.java:171)
>         at org.apache.pig.impl.logicalLayer.PlanSetter.visit(PlanSetter.java:63)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:213)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:45)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:67)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:69)
>         at org.apache.pig.impl.plan.DepthFirstWalker.walk(DepthFirstWalker.java:50)
>         at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloneHelper.getClonedPlan(LogicalPlanCloneHelper.java:73)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloner.getClonedPlan(LogicalPlanCloner.java:46)
>         at org.apache.pig.test.TestLogicalPlanBuilder.testLogicalPlanCloneHelper(TestLogicalPlanBuilder.java:2110)

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


[jira] Commented: (PIG-1073) LogicalPlanCloner can't clone plan containing LOJoin

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774146#action_12774146 ] 

Ashutosh Chauhan commented on PIG-1073:
---------------------------------------

It seems that fix is to override the visit method in LogicalPlanCloneHelper.java

    @Override
    protected void visit(LOJoin loJoin) throws VisitorException { .. }

> LogicalPlanCloner can't clone plan containing LOJoin
> ----------------------------------------------------
>
>                 Key: PIG-1073
>                 URL: https://issues.apache.org/jira/browse/PIG-1073
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>            Reporter: Ashutosh Chauhan
>
> Add following testcase in LogicalPlanBuilder.java
> public void testLogicalPlanCloner() throws CloneNotSupportedException{
>         LogicalPlan lp = buildPlan("C = join ( load 'A') by $0, (load 'B') by $0;");
>         LogicalPlanCloner cloner = new LogicalPlanCloner(lp);
>         cloner.getClonedPlan();
>     }
> and this fails with the following stacktrace:
> java.lang.NullPointerException
>         at org.apache.pig.impl.logicalLayer.LOVisitor.visit(LOVisitor.java:171)
>         at org.apache.pig.impl.logicalLayer.PlanSetter.visit(PlanSetter.java:63)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:213)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:45)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:67)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:69)
>         at org.apache.pig.impl.plan.DepthFirstWalker.walk(DepthFirstWalker.java:50)
>         at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloneHelper.getClonedPlan(LogicalPlanCloneHelper.java:73)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloner.getClonedPlan(LogicalPlanCloner.java:46)
>         at org.apache.pig.test.TestLogicalPlanBuilder.testLogicalPlanCloneHelper(TestLogicalPlanBuilder.java:2110)

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


[jira] Updated: (PIG-1073) LogicalPlanCloner can't clone plan containing LOJoin

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated PIG-1073:
----------------------------------

    Attachment: pig-1073-1.patch

updated patch

> LogicalPlanCloner can't clone plan containing LOJoin
> ----------------------------------------------------
>
>                 Key: PIG-1073
>                 URL: https://issues.apache.org/jira/browse/PIG-1073
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>            Reporter: Ashutosh Chauhan
>            Assignee: Ashutosh Chauhan
>         Attachments: pig-1073-1.patch
>
>
> Add following testcase in LogicalPlanBuilder.java
> public void testLogicalPlanCloner() throws CloneNotSupportedException{
>         LogicalPlan lp = buildPlan("C = join ( load 'A') by $0, (load 'B') by $0;");
>         LogicalPlanCloner cloner = new LogicalPlanCloner(lp);
>         cloner.getClonedPlan();
>     }
> and this fails with the following stacktrace:
> java.lang.NullPointerException
>         at org.apache.pig.impl.logicalLayer.LOVisitor.visit(LOVisitor.java:171)
>         at org.apache.pig.impl.logicalLayer.PlanSetter.visit(PlanSetter.java:63)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:213)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:45)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:67)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:69)
>         at org.apache.pig.impl.plan.DepthFirstWalker.walk(DepthFirstWalker.java:50)
>         at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloneHelper.getClonedPlan(LogicalPlanCloneHelper.java:73)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloner.getClonedPlan(LogicalPlanCloner.java:46)
>         at org.apache.pig.test.TestLogicalPlanBuilder.testLogicalPlanCloneHelper(TestLogicalPlanBuilder.java:2110)

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


[jira] Updated: (PIG-1073) LogicalPlanCloner can't clone plan containing LOJoin

Posted by "Ashutosh Chauhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashutosh Chauhan updated PIG-1073:
----------------------------------

    Attachment:     (was: pig-1073.patch)

> LogicalPlanCloner can't clone plan containing LOJoin
> ----------------------------------------------------
>
>                 Key: PIG-1073
>                 URL: https://issues.apache.org/jira/browse/PIG-1073
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>            Reporter: Ashutosh Chauhan
>            Assignee: Ashutosh Chauhan
>
> Add following testcase in LogicalPlanBuilder.java
> public void testLogicalPlanCloner() throws CloneNotSupportedException{
>         LogicalPlan lp = buildPlan("C = join ( load 'A') by $0, (load 'B') by $0;");
>         LogicalPlanCloner cloner = new LogicalPlanCloner(lp);
>         cloner.getClonedPlan();
>     }
> and this fails with the following stacktrace:
> java.lang.NullPointerException
>         at org.apache.pig.impl.logicalLayer.LOVisitor.visit(LOVisitor.java:171)
>         at org.apache.pig.impl.logicalLayer.PlanSetter.visit(PlanSetter.java:63)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:213)
>         at org.apache.pig.impl.logicalLayer.LOJoin.visit(LOJoin.java:45)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:67)
>         at org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:69)
>         at org.apache.pig.impl.plan.DepthFirstWalker.walk(DepthFirstWalker.java:50)
>         at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloneHelper.getClonedPlan(LogicalPlanCloneHelper.java:73)
>         at org.apache.pig.impl.logicalLayer.LogicalPlanCloner.getClonedPlan(LogicalPlanCloner.java:46)
>         at org.apache.pig.test.TestLogicalPlanBuilder.testLogicalPlanCloneHelper(TestLogicalPlanBuilder.java:2110)

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