[ https://issues.apache.org/jira/browse/PIG-900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Ciemiewicz updated PIG-900: --------------------------------- Description: With GROUP BY, you must put parentheses around the aliases in the BY clause: {code} B = group A by ( a, b, c ); {code} With FILTER BY, you can optionally put parentheses around the aliases in the BY clause: {code} B = filter A by ( a is not null and b is not null and c is not null ); {code} However, with ORDER BY, if you put parenthesis around the BY clause, you get a syntax error: {code} A = order A by ( a, b, c); {code} Produces the error: {code} 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: ")" ... {code} This is an annoyance really. Here's my full code example ... {code} A = load 'data.txt' using PigStorage as (a: chararray, b: chararray, c: chararray ); A = order A by ( a, b, c ); dump A; {code} was: With GROUP BY, you must put parentheses around the aliases in the BY clause: {code} B = group A by ( a, b, c ); {code} With FILTER BY, you can optionally put parentheses around the aliases in the BY clause: {code} B = filter A by ( a is not null and b is not null and c is not null ); {code} However, with ORDER BY, if you put parenthesis around the BY clause, you get a syntax error: {code} A = order A by ( a, b, c); {code} Produces the error: {code} 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: ")" ... {code} This is an annoyance really. {code} A = load 'data.txt' using PigStorage as (a: chararray, b: chararray, c: chararray ); A = order A by ( a, b, c ); dump A; {code} > ORDER BY syntax wrt parentheses is somewhat different than GROUP BY and > FILTER BY > --------------------------------------------------------------------------------- > > Key: PIG-900 > URL: https://issues.apache.org/jira/browse/PIG-900 > Project: Pig > Issue Type: Bug > Reporter: David Ciemiewicz > > With GROUP BY, you must put parentheses around the aliases in the BY clause: > {code} > B = group A by ( a, b, c ); > {code} > With FILTER BY, you can optionally put parentheses around the aliases in the > BY clause: > {code} > B = filter A by ( a is not null and b is not null and c is not null ); > {code} > However, with ORDER BY, if you put parenthesis around the BY clause, you get > a syntax error: > {code} > A = order A by ( a, b, c); > {code} > Produces the error: > {code} > 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: > ")" ... > {code} > This is an annoyance really. > Here's my full code example ... > {code} > A = load 'data.txt' using PigStorage as (a: chararray, b: chararray, c: > chararray ); > A = order A by ( a, b, c ); > dump A; > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.