Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> concatenating tuples into one tuple?

Copy link to this message
concatenating tuples into one tuple?
I have a post-grouping relation:

a =  { id: chararray, bitmap{ (value_binary: int) } },

where the value_binary tuples are single-element tuples that have been sorted--the order of the single-element tuples is important.  All the "bitmap" bags are guaranteed to have the same number of single element tuples, but that number is arbitrary.  That is, I can't depend in advance on knowing how many tuples there will be in "bitmap", but I can depend on each bitmap having the same number of tuples.  An example of an instance with 5 tuples:

9    {(1),(0),(0),(0),(0)}

Would need to become:

9   {(1,0,0,0,0)}

...concatenating those tuples into one tuple, preserving the order, again without having advance knowledge of how many tuples will be in "bitmap".  I can't figure out how to do it.

Thanks in advance for any suggestions...
Steve Bernstein 2013-04-30, 18:46
Steve Bernstein 2013-04-30, 19:11