Return-Path: Delivered-To: apmail-pig-dev-archive@www.apache.org Received: (qmail 85542 invoked from network); 3 Mar 2011 19:22:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Mar 2011 19:22:57 -0000 Received: (qmail 76899 invoked by uid 500); 3 Mar 2011 19:22:57 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 76879 invoked by uid 500); 3 Mar 2011 19:22:57 -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 76870 invoked by uid 500); 3 Mar 2011 19:22:57 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 76867 invoked by uid 99); 3 Mar 2011 19:22:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Mar 2011 19:22:57 +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; Thu, 03 Mar 2011 19:22:57 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 2E5F84E670 for ; Thu, 3 Mar 2011 19:22:37 +0000 (UTC) Date: Thu, 3 Mar 2011 19:22:37 +0000 (UTC) From: "Alan Gates (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <1284889513.11649.1299180157186.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <489619999.4971.1296652049236.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (PIG-1839) piggybank: XMLLoader will always add an extra empty tuple even if no tags are matched 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-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002152#comment-13002152 ] Alan Gates commented on PIG-1839: --------------------------------- Checked into the 0.8 branch. > piggybank: XMLLoader will always add an extra empty tuple even if no tags are matched > ------------------------------------------------------------------------------------- > > Key: PIG-1839 > URL: https://issues.apache.org/jira/browse/PIG-1839 > Project: Pig > Issue Type: Bug > Affects Versions: 0.7.0, 0.8.0, 0.9.0 > Reporter: Vivek Padmanabhan > Assignee: Vivek Padmanabhan > Fix For: 0.9.0 > > Attachments: PIG-1839-1.patch > > > The XMLLoader in piggy bank always add an empty tuple. Everytime this has to be filtered out. Instead the same could be done by the loader itself. > Consider the below script : > a= load 'a.xml' using org.apache.pig.piggybank.storage.XMLLoader('name'); > dump a; > b= filter a by $0 is not null; > dump b; > The output of first dump is : > ( foobar ) > ( foo ) > ( justname ) > () > The output of second dump is : > ( foobar ) > ( foo ) > ( justname ) > Again another case is if I dont have a matching tag , still the loader will generate the empty tuple. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira