This UDF takes a Map and returns a Bag containing the keyset.
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 KEYSET($0); grunt> dump b; ({(open),(1),(11)}) ({(3),(apache),(12)})
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.