You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Vivek Padmanabhan (JIRA)" <ji...@apache.org> on 2011/02/02 14:07:29 UTC

[jira] Created: (PIG-1839) piggybank: XMLLoader will always add an extra empty tuple even if no tags are matched

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.8.0, 0.7.0, 0.9.0
            Reporter: Vivek Padmanabhan
            Assignee: Vivek Padmanabhan


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

        

[jira] Updated: (PIG-1839) piggybank: XMLLoader will always add an extra empty tuple even if no tags are matched

Posted by "Vivek Padmanabhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vivek Padmanabhan updated PIG-1839:
-----------------------------------

    Attachment: PIG-1839-1.patch

Attaching the initial patch. 
Please note that I have modified the existing test case to assert for the correct number of tuples .

> 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
>         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

        

[jira] Updated: (PIG-1839) piggybank: XMLLoader will always add an extra empty tuple even if no tags are matched

Posted by "Vivek Padmanabhan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vivek Padmanabhan updated PIG-1839:
-----------------------------------

    Patch Info: [Patch Available]

> 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
>         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

        

[jira] Resolved: (PIG-1839) piggybank: XMLLoader will always add an extra empty tuple even if no tags are matched

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-1839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Gates resolved PIG-1839.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 0.9.0
     Release Note: contrib unit tests all pass.  Fix checked in.  Thanks Vivek for the contribution.

> 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

        

[jira] Commented: (PIG-1839) piggybank: XMLLoader will always add an extra empty tuple even if no tags are matched

Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
    [ 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