-RE: ORDER BY a map value fails with a syntax error - pig bug?
"Pig currently supports ordering on fields with simple types or by tuple designator (*). You cannot order on fields with complex types or by expressions."
I think "you cannot order ... by expressions" means the behavior you see is expected.
William F Dowling
From: Ruslan Al-Fakikh [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 29, 2013 2:35 PM
To: [EMAIL PROTECTED]
Subject: ORDER BY a map value fails with a syntax error - pig bug?
The following script:
A = LOAD 'input' AS (M:map );
sorted = ORDER A BY M#'key1';
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;
Is it a bug in Pig?