[
https://issues.apache.org/jira/browse/PIG-1644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Dai resolved PIG-1644.
-----------------------------
Hadoop Flags: [Reviewed]
Resolution: Fixed
[exec] +1 overall.
[exec]
[exec] +1 @author. The patch does not contain any @author tags.
[exec]
[exec] +1 tests included. The patch appears to include 6 new or
modified tests.
[exec]
[exec] +1 javadoc. The javadoc tool did not generate any warning
messages.
[exec]
[exec] +1 javac. The applied patch does not increase the total number
of javac compiler warnings.
[exec]
[exec] +1 findbugs. The patch does not introduce any new Findbugs
warnings.
[exec]
[exec] +1 release audit. The applied patch does not increase the
total number of release audit warnings.
All tests pass.
Patch committed to both trunk and 0.8 branch.
> 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, PIG-1644-2.patch, PIG-1644-3.patch,
> PIG-1644-4.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.