Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> Losing ordering after using ORDER BY


Copy link to this message
-
Losing ordering after using ORDER BY
Hi,

I've noticed that I seem to be losing the ordering of my relation after
passing the result of an ORDER BY to an EVAL function.

For example:

D = FOREACH C GENERATE COUNT($1) as countd;
E = ORDER D BY $0 DESC;
D1 = GROUP E ALL;
D2 = FOREACH D1 GENERATE MyCustomEvalFunc($1);

When inspecting the results in MyCustomEvalFunc I noticed the ordering of
my results isn't the same as relation E (which uses ORDER BY DESC).

Any help appreciated!

Thanks,
James