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

Switch to Threaded View
Pig >> mail # user >> ORDER BY a map value fails with a syntax error - pig bug?


Copy link to this message
-
ORDER BY a map value fails with a syntax error - pig bug?
Hi guys,

The following script:

A = LOAD 'input' AS (M:map []);
sorted = ORDER A BY M#'key1';
dump sorted;

gives:
2013-10-29 14:31:03,611 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1200: <file script1.pig, line 2, column 20>  Syntax error, unexpected
symbol at or near 'M'

While this one:
 LOAD 'input' AS (M:map []);
named = foreach A generate *, M#'key1' as myfield;
sorted = ORDER named BY myfield;
dump sorted;

is OK

Is it a bug in Pig?

Best Regards,
Ruslan Al-Fakikh