Return-Path: Delivered-To: apmail-hadoop-pig-dev-archive@www.apache.org Received: (qmail 51211 invoked from network); 23 Sep 2010 18:01:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Sep 2010 18:01:07 -0000 Received: (qmail 4537 invoked by uid 500); 23 Sep 2010 18:01:06 -0000 Delivered-To: apmail-hadoop-pig-dev-archive@hadoop.apache.org Received: (qmail 4497 invoked by uid 500); 23 Sep 2010 18:01:06 -0000 Mailing-List: contact pig-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pig-dev@hadoop.apache.org Delivered-To: mailing list pig-dev@hadoop.apache.org Received: (qmail 4489 invoked by uid 99); 23 Sep 2010 18:01:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Sep 2010 18:01:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Sep 2010 18:01:05 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8NI0ink006593 for ; Thu, 23 Sep 2010 18:00:44 GMT Message-ID: <1444300.368021285264844366.JavaMail.jira@thor> Date: Thu, 23 Sep 2010 14:00:44 -0400 (EDT) From: "Thejas M Nair (JIRA)" To: pig-dev@hadoop.apache.org Subject: [jira] Commented: (PIG-1644) New logical plan: Plan.connect with position is misused in some places In-Reply-To: <17218349.357371285201772633.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PIG-1644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12914130#action_12914130 ] Thejas M Nair commented on PIG-1644: ------------------------------------ These operations will be fairly common in the optimizer. I think it would be good to have functions in the OperatorPlan that support these operations, that will reduce the chances of bugs and also make the code more readable. > 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 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 pos1 = plan.disconnect(pred, nodeToRemove); > Pair pos2 = plan.disconnect(nodeToRemove, succ); > plan.connect(pred, pos1.first, succ, pos2.second); > {code} > Replace a node: > {code} > Pair pos1 = plan.disconnect(pred, nodeToReplace); > Pair 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.