You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "David Ciemiewicz (JIRA)" <ji...@apache.org> on 2009/08/03 20:35:14 UTC
[jira] Created: (PIG-900) ORDER BY syntax wrt parentheses is
somewhat different than GROUP BY and FILTER BY
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.
{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.
[jira] Commented: (PIG-900) ORDER BY syntax wrt parentheses is
somewhat different than GROUP BY and FILTER BY
Posted by "Jeff Zhang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741096#action_12741096 ]
Jeff Zhang commented on PIG-900:
--------------------------------
David,
I try your script. it looks like pig do not support order by tuple. I think it would be better to support this feature for pig.
> 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.
[jira] Updated: (PIG-900) ORDER BY syntax wrt parentheses is
somewhat different than GROUP BY and FILTER BY
Posted by "David Ciemiewicz (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Assigned: (PIG-900) ORDER BY syntax wrt parentheses is
somewhat different than GROUP BY and FILTER BY
Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-900?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alan Gates reassigned PIG-900:
------------------------------
Assignee: Xuefu Zhang
> 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.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.
[jira] Updated: (PIG-900) ORDER BY syntax wrt parentheses is
somewhat different than GROUP BY and FILTER BY
Posted by "David Ciemiewicz (JIRA)" <ji...@apache.org>.
[ 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.
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}
> 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.
[jira] Commented: (PIG-900) ORDER BY syntax wrt parentheses is
somewhat different than GROUP BY and FILTER BY
Posted by "Alan Gates (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909031#action_12909031 ]
Alan Gates commented on PIG-900:
--------------------------------
Filter is different, because you are providing one boolean condition. But I agree order by, group by, and join, all of which you are specifying a set of keys, should take the same syntax. We cannot force a change in one version, but we can adopt one as standard and warn that the other is deprecated. I propose we remove the parenthesis from group and join to match order, as that matches SQL and is less verbose.
> 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.
[jira] Updated: (PIG-900) ORDER BY syntax wrt parentheses is
somewhat different than GROUP BY and FILTER BY
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ 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.