hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dai (JIRA)" <j...@apache.org>
Subject [jira] Updated: (PIG-1644) New logical plan: Plan.connect with position is misused in some places
Date Thu, 23 Sep 2010 01:02:32 GMT

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

Daniel Dai updated PIG-1644:

    Attachment: PIG-1644-1.patch

Attach the patch to address all such places in new logical plan, except for ExpressionSimplifier.
There is some work underway for ExpressionSimplifier ([PIG-1635|https://issues.apache.org/jira/browse/PIG-1635])
include some of these changes, I don't want to conflict with that patch. So after PIG-1635,
we may also review the connect/disconnect usage of ExpressionSimplifier.

> New logical plan: Plan.connect with position is misused in some places
> ----------------------------------------------------------------------
>                 Key: PIG-1644
>                 URL: https://issues.apache.org/jira/browse/PIG-1644
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.8.0
>            Reporter: Daniel Dai
>            Assignee: Daniel Dai
>             Fix For: 0.8.0
>         Attachments: PIG-1644-1.patch
> When we replace/remove/insert a node, we will use disconnect/connect methods of OperatorPlan.
When we disconnect an edge, we shall save the position of the edge in origination and destination,
and use this position when connect to the new predecessor/successor. Some of the pattens are:
> Insert a new node:
> {code}
> Pair<Integer, Integer> pos = plan.disconnect(pred, succ);
> plan.connect(pred, pos.first, newnode, 0);
> plan.connect(newnode, 0, succ, pos.second);
> {code}
> Remove a node:
> {code}
> Pair<Integer, Integer> pos1 = plan.disconnect(pred, nodeToRemove);
> Pair<Integer, Integer> pos2 = plan.disconnect(nodeToRemove, succ);
> plan.connect(pred, pos1.first, succ, pos2.second);
> {code}
> Replace a node:
> {code}
> Pair<Integer, Integer> pos1 = plan.disconnect(pred, nodeToReplace);
> Pair<Integer, Integer> pos2 = plan.disconnect(nodeToReplace, succ);
> plan.connect(pred, pos1.first, newNode, pos1.second);
> plan.connect(newNode, pos2.first, succ, pos2.second);
> {code}
> There are couple of places of we does not follow this pattern, that results some error.
For example, the following script fail:
> {code}
> a = load '1.txt' as (a0, a1, a2, a3);
> b = foreach a generate a0, a1, a2;
> store b into 'aaa';
> c = order b by a2;
> d = foreach c generate a2;
> store d into 'bbb';
> {code}

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

View raw message