I wrote a UDF which produces the following DataBag with 2 tuples. I want to
sort the results based on the first tuple but get an error.

grunt>I2L2_f = FOREACH I2L2_grp_t GENERATE udfs.FormatBasketName($1);
grunt>dump I2L2_f;
({(3L),(1634|1966)})
({(2L),(1634|3845)})
({(3L),(1787|7000)})
({(2L),(1966|3845)})
({(3L),(4703|4282)})
({(3L),(7298|5844)})
grunt>I2L2 = ORDER I2L2_f BY $0 DESC;
java.lang.ClassCastException: java.lang.Long cannot be cast to
org.apache.pig.data.DataBag

How can I sort the results from my UDF?

Thanks!
-M@

Reply via email to