Re: Extending Explode

2013-07-26 Thread Jerome Banks
FYI, Brickhouse provides a numeric_range UDTF, which explodes integer values, and an array_index UDF, so you could solve your problem by exploding on a numeric range of the size of the array. ie. select n, array_index(arr, n ) from mytable lateral view numeric_range(0, size(arr) -1 ) n1 as n ;

Re: Extending Explode

2013-07-26 Thread Edward Capriolo
So the explode output should be in the order of the array or the map you are exploding. I think you could use rank or row-sequence to give the exploded attay a number. If that does not wok adding a new udf might make more sence then extwnding in this case.: On Friday, July 26, 2013, wrote: > Hi

Extending Explode

2013-07-26 Thread nikolaus . stahl
Hi, I'd like to make a patch that extends the functionality of "explode" to include an output column with the position of each item in the original array. I imagine this could be useful to the greater community and am wondering if I should extend the current explode function or if I sho