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 <pv...@yahoo-inc.com> on 2011/07/11 08:49:29 UTC

Review Request:

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1064/
-----------------------------------------------------------

Review request for pig.


Summary
-------


Currently xmlloader does not support nested tags with same tag name, ie if i have the below content

<event>
 <relatedEvents>
   <event>x<\event>
   <event>y<\event>
   <event>z<\event>
 <\relatedEvents>
<\event>

And I load the above using XMLLoader,
events = load 'input' using org.apache.pig.piggybank.storage.XMLLoader('event') as (doc:chararray);

The output will be,

<event>
 <relatedEvents>
   <event>x<\event>

Whereas the desired output is ;

<relatedEvents>
   <event>x<\event>
   <event>y<\event>
   <event>z<\event>
 <\relatedEvents>

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Modified the behaviour of XMLLoader such that it considers the nested tags also. This is implemented by simply counting the number of nesting and decrementing accordingly.


This addresses bug PIG-2147.
    https://issues.apache.org/jira/browse/PIG-2147


Diffs
-----


Diff: https://reviews.apache.org/r/1064/diff


Testing
-------


Thanks,

Vivek