You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Olga Natkovich (JIRA)" <ji...@apache.org> on 2011/03/17 19:50:30 UTC
[jira] Updated: (PIG-900) ORDER BY syntax wrt parentheses is
somewhat different than GROUP BY and FILTER BY
[ https://issues.apache.org/jira/browse/PIG-900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-900:
-------------------------------
Fix Version/s: (was: 0.9.0)
0.10
I believe we need to make the rules consistent across all operators. That includes GROUP/COGROUP, JOIN, and ORDER BY.
To make sure we do not break backward compatibility, the best way to do this is to make paranthesis allowed but optional for all operators above.
I believe there is already a lot of change in 0.9 so we will address this in 10.
> 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
> Assignee: Xuefu Zhang
> Fix For: 0.10
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira