Return-Path: Delivered-To: apmail-hadoop-pig-dev-archive@www.apache.org Received: (qmail 2782 invoked from network); 1 Jan 2009 17:11:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Jan 2009 17:11:05 -0000 Received: (qmail 38270 invoked by uid 500); 1 Jan 2009 17:11:05 -0000 Delivered-To: apmail-hadoop-pig-dev-archive@hadoop.apache.org Received: (qmail 38246 invoked by uid 500); 1 Jan 2009 17:11:05 -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 38228 invoked by uid 99); 1 Jan 2009 17:11:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jan 2009 09:11:05 -0800 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Jan 2009 17:11:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3CAE8234C46D for ; Thu, 1 Jan 2009 09:10:44 -0800 (PST) Message-ID: <2054670969.1230829844234.JavaMail.jira@brutus> Date: Thu, 1 Jan 2009 09:10:44 -0800 (PST) From: "David Ciemiewicz (JIRA)" To: pig-dev@hadoop.apache.org Subject: [jira] Commented: (PIG-596) Anonymous tuples in bags create ParseExceptions In-Reply-To: <1031903289.1230774764206.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PIG-596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660202#action_12660202 ] David Ciemiewicz commented on PIG-596: -------------------------------------- The reason I think it is important to be able to create anonymous tuples is because the tuples are anonymous in the LOAD statements. Because, if you FLATTEN a bag such as mybag, any intermediate tuple label is immediately lost and the results of the flatten are mybag::a, mybag::b. They are not mybag::tuplelabel::a, mybag::tuplelabel::b; > Anonymous tuples in bags create ParseExceptions > ----------------------------------------------- > > Key: PIG-596 > URL: https://issues.apache.org/jira/browse/PIG-596 > Project: Pig > Issue Type: Bug > Affects Versions: types_branch > Reporter: David Ciemiewicz > > {code} > One = load 'one.txt' using PigStorage() as ( one: int ); > LabelledTupleInBag = foreach One generate { ( 1, 2 ) } as mybag { tuplelabel: tuple ( a, b ) }; > AnonymousTupleInBag = foreach One generate { ( 2, 3 ) } as mybag { tuple ( a, b ) }; -- Anonymous tuple creates bug > Tuples = union LabelledTupleInBag, AnonymousTupleInBag; > dump Tuples; > {code} > java.io.IOException: Encountered "{ tuple" at line 6, column 66. > Was expecting one of: > "parallel" ... > ";" ... > "," ... > ":" ... > "(" ... > "{" ... > "{" "}" ... > "[" ... > > at org.apache.pig.PigServer.parseQuery(PigServer.java:298) > at org.apache.pig.PigServer.registerQuery(PigServer.java:263) > at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:439) > at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:249) > at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:84) > at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:64) > at org.apache.pig.Main.main(Main.java:306) > Caused by: org.apache.pig.impl.logicalLayer.parser.ParseException: Encountered "{ tuple" at line 6, column 66. > Why can't there be an anonymous tuple at the top level of a bag? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.