pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Gates (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-1839) piggybank: XMLLoader will always add an extra empty tuple even if no tags are matched
Date Thu, 03 Mar 2011 19:22:37 GMT

    [ 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 :
> (<name> foobar </name>)
> (<name> foo </name>)
> (<name> justname </name>)
> ()
> The output of second dump is :
> (<name> foobar </name>)
> (<name> foo </name>)
> (<name> justname </name>)
> 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

        

Mime
View raw message