Return-Path: Delivered-To: apmail-pig-dev-archive@www.apache.org Received: (qmail 89146 invoked from network); 5 Apr 2011 22:01:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Apr 2011 22:01:44 -0000 Received: (qmail 96313 invoked by uid 500); 5 Apr 2011 22:01:43 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 96291 invoked by uid 500); 5 Apr 2011 22:01:43 -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 96282 invoked by uid 500); 5 Apr 2011 22:01:43 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 96279 invoked by uid 99); 5 Apr 2011 22:01:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2011 22:01:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2011 22:01:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 0AD3F94189 for ; Tue, 5 Apr 2011 22:01:06 +0000 (UTC) Date: Tue, 5 Apr 2011 22:01:06 +0000 (UTC) From: "Mridul Muralidharan (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <1457482296.36108.1302040866041.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <11196823.30591287770165541.JavaMail.jira@thor> Subject: [jira] [Commented] (PIG-1693) support project-range expression. (was: There needs to be a way in foreach to indicate "and all the rest of the fields" ) 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-1693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016145#comment-13016145 ] Mridul Muralidharan commented on PIG-1693: ------------------------------------------ I am not sure what the comment means - do you mean (in the example above) : a) $3.. works for an unspecified number of columns when there is no load schema ? b) or, $3..$MAX is required ? (so we should be schema aware). Or do you simply mean '..' works when there is no loader schema (which I assumed it would anyway) without commenting on the actual usecase I refer to above ? Thanks, Mridul > support project-range expression. (was: There needs to be a way in foreach to indicate "and all the rest of the fields" ) > ------------------------------------------------------------------------------------------------------------------------- > > Key: PIG-1693 > URL: https://issues.apache.org/jira/browse/PIG-1693 > Project: Pig > Issue Type: New Feature > Components: impl > Reporter: Alan Gates > Assignee: Thejas M Nair > Fix For: 0.9.0 > > Attachments: PIG-1693.1.patch, PIG-1693.2.patch > > > A common use case we see in Pig is people have many columns in their data and they only want to operate on a few of them. Consider for example if before storing data with ten columns, the user wants to perform a cast on one column: > {code} > ... > Z = foreach Y generate (int)firstcol, secondcol, thridcol, forthcol, fifthcol, sixthcol, seventhcol, eigthcol, ninethcol, tenthcol; > store Z into 'output'; > {code} > Obviously this only gets worse as the user has more columns. Ideally the above could be transformed to something like: > {code} > ... > Z = foreach Y generate (int)firstcol, "and all the rest"; > store Z into 'output' > {code} -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira