You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Thejas M Nair (JIRA)" <ji...@apache.org> on 2011/07/13 01:12:59 UTC
[jira] [Commented] (PIG-2156) Limit with variable does not work if
the expression starts with an integer
[ https://issues.apache.org/jira/browse/PIG-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064226#comment-13064226 ]
Thejas M Nair commented on PIG-2156:
------------------------------------
Can we add a similar fix for scalar expressions in sample as well ? -
{code}
grunt> s = sample l 0.1 * res.$0;
2011-07-12 16:10:24,131 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 6, column 17> mismatched input '*' expecting SEMI_COLON
Details at logfile: /Users/thejas/test_limit_expr/trunk/pig_1310512142490.log
{code}
> Limit with variable does not work if the expression starts with an integer
> --------------------------------------------------------------------------
>
> Key: PIG-2156
> URL: https://issues.apache.org/jira/browse/PIG-2156
> Project: Pig
> Issue Type: Bug
> Reporter: Gianmarco De Francisci Morales
> Assignee: Gianmarco De Francisci Morales
> Attachments: PIG-2156.patch
>
>
> Pig generates an error with this script:
> {code}
> grunt> a = load 'a.txt';
> grunt> b = group a all;
> grunt> c = foreach b generate COUNT(a) as sum;
> grunt> d = limit a 1 * c.sum;
> [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: <line 4, column 14> mismatched input '*' expecting SEMI_COLON
> {code}
> The reason is the parser chooses the wrong alternative.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira