This UDF takes a Map and returns a Bag containing the values from map. Note that output tuple contains all values, not just unique ones. For obtaining unique values from map, use VALUESET instead.
grunt> cat data [open#apache,1#2,11#2] [apache#hadoop,3#4,12#hadoop] grunt> a = load 'data' as (M:[]); grunt> b = foreach a generate VALUELIST($0); grunt> dump b; ({(apache),(2),(2)}) ({(4),(hadoop),(hadoop)})
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.