Grokbase Groups Pig dev July 2011
FAQ
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


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

Search Discussions

  • Gianmarco De Francisci Morales (JIRA) at Jul 12, 2011 at 3:40 pm
    [ https://issues.apache.org/jira/browse/PIG-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Gianmarco De Francisci Morales updated PIG-2156:
    ------------------------------------------------

    Attachment: PIG-2156.patch

    Attached patch and test.
    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
  • Gianmarco De Francisci Morales (JIRA) at Jul 12, 2011 at 3:40 pm
    [ https://issues.apache.org/jira/browse/PIG-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Gianmarco De Francisci Morales updated PIG-2156:
    ------------------------------------------------

    Status: Patch Available (was: Open)
    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
  • Thejas M Nair (JIRA) at Jul 12, 2011 at 11:13 pm
    [ 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
  • Gianmarco De Francisci Morales (JIRA) at Jul 13, 2011 at 9:45 am
    [ https://issues.apache.org/jira/browse/PIG-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Gianmarco De Francisci Morales updated PIG-2156:
    ------------------------------------------------

    Summary: Limit/Sample with variable does not work if the expression starts with an integer/double (was: Limit with variable does not work if the expression starts with an integer)
    Limit/Sample with variable does not work if the expression starts with an integer/double
    ----------------------------------------------------------------------------------------

    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
  • Gianmarco De Francisci Morales (JIRA) at Jul 13, 2011 at 10:26 am
    [ https://issues.apache.org/jira/browse/PIG-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Gianmarco De Francisci Morales updated PIG-2156:
    ------------------------------------------------

    Attachment: PIG-2156.2.patch

    Sure, here it is (PIG-2156.2.patch).
    Modified a test to check for this issue as well.

    Limit/Sample with variable does not work if the expression starts with an integer/double
    ----------------------------------------------------------------------------------------

    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.2.patch, 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
  • Thejas M Nair (JIRA) at Jul 14, 2011 at 4:15 pm
    [ https://issues.apache.org/jira/browse/PIG-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-2156:
    -------------------------------

    Resolution: Fixed
    Hadoop Flags: [Reviewed]
    Status: Resolved (was: Patch Available)

    +1 . Patch committed to trunk.
    Thanks Gianmarco!

    Limit/Sample with variable does not work if the expression starts with an integer/double
    ----------------------------------------------------------------------------------------

    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.2.patch, 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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriespig, hadoop
postedJul 12, '11 at 2:53p
activeJul 14, '11 at 4:15p
posts7
users1
websitepig.apache.org

1 user in discussion

Thejas M Nair (JIRA): 7 posts

People

Translate

site design / logo © 2022 Grokbase