At a glance it could be this: The first field in D.A is of type chararray, but TOP orders based on long. -Sven
On Tue, Apr 26, 2011 at 6:11 AM, ugo jardonnet <ugo.jardon...@gmail.com>wrote: > Hi. I am looking for a way to get the result of top ordered. Is it possible > ? > > Example: > > A = LOAD 'datatest' USING PigStorage(';') as (first: chararray, second: > int); > D = GROUP A BY first; > topResults = FOREACH D { > result = TOP(3, 1, A); > GENERATE flatten(result); -- unordered > }; > dump topResults > > best, > -- http://sites.google.com/site/krasser/