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 2010/07/12 20:28:50 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: 0.9.0

> 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
>             Fix For: 0.9.0
>
>
> 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.