Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
With GROUP BY, you must put parentheses around the aliases in the BY clause:
B = group A by ( a, b, c );
With FILTER BY, you can optionally put parentheses around the aliases in the BY clause:
B = filter A by ( a is not null and b is not null and c is not null );
However, with ORDER BY, if you put parenthesis around the BY clause, you get a syntax error:
A = order A by ( a, b, c );
Produces the error:
2009-08-03 18:26:29,544 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Encountered " "," ", "" at line 3, column 19. Was expecting: ")" ...
This is an annoyance really.
Here's my full code example ...
A = load 'data.txt' using PigStorage as (a: chararray, b: chararray, c: chararray );
A = order A by ( a, b, c );
dump A;
Attachments
Issue Links
- depends upon
-
PIG-1618 Switch to new parser generator technology
- Closed