Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 94FF9D495 for ; Tue, 30 Oct 2012 15:44:14 +0000 (UTC) Received: (qmail 80988 invoked by uid 500); 30 Oct 2012 15:44:14 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 80860 invoked by uid 500); 30 Oct 2012 15:44:14 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 80821 invoked by uid 500); 30 Oct 2012 15:44:14 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 80437 invoked by uid 99); 30 Oct 2012 15:44:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2012 15:44:13 +0000 Date: Tue, 30 Oct 2012 15:44:13 +0000 (UTC) From: "Olga Natkovich (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <262368057.44982.1351611853708.JavaMail.jiratomcat@arcas> In-Reply-To: <785845574.40423.1336503591658.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (PIG-2687) Add relation/operator scoping to Pig 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-2687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olga Natkovich updated PIG-2687: -------------------------------- Fix Version/s: (was: 0.11) 0.12 > Add relation/operator scoping to Pig > ------------------------------------ > > Key: PIG-2687 > URL: https://issues.apache.org/jira/browse/PIG-2687 > Project: Pig > Issue Type: Improvement > Reporter: Jonathan Coveney > Priority: Minor > Fix For: 0.12 > > > The idea is to add a real notion of scope that can be used to manage namespace. This would mean the addition of blocks to pig, probably with some sort of syntax like this... > {code} > a = load thing as (x:int, y:int); > b = foreach a generate x, y, x*y as z; > { > a = group b by z; > b = foreach a generate COUNT(b); > global b; > } > {code} > which would replace the alias b with the nested b value in the scope. This could also be used in nested foreach blocks, and macros could just become blocks as well. > I am 95% sure about how to implement this... I have a failed patch attempt, and need to study a bit more about how Pig uses its logical operators. > Any thoughts? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira