You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Anitha Raju (JIRA)" <ji...@apache.org> on 2011/04/21 12:05:05 UTC

[jira] [Created] (PIG-2007) Parsing error when map key referred directly from udf in nested foreach

Parsing error when map key referred directly from udf in nested foreach 
------------------------------------------------------------------------

                 Key: PIG-2007
                 URL: https://issues.apache.org/jira/browse/PIG-2007
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.9.0
            Reporter: Anitha Raju



The below script when executed with version 0.9 fails with parsing error.

{code}
 ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
{code}

Script1
{code}
register myudf.jar;
A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
B1 = foreach A {
        C = test.TOMAP('key1',$1)#'key1';
        generate C as C;
}
{code}

The above happens when, in a nested foreach i refer to a map key directly from a udf result

The same would work if one executes without the nested foreach.
{code}
register myudf.jar;
A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
dump B1;
{code}

Script1 works well with 0.8.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2007) Parsing error when map key referred directly from udf in nested foreach

Posted by "Xuefu Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xuefu Zhang updated PIG-2007:
-----------------------------

    Attachment: PIG-2007.patch

Unit test passed.

> Parsing error when map key referred directly from udf in nested foreach 
> ------------------------------------------------------------------------
>
>                 Key: PIG-2007
>                 URL: https://issues.apache.org/jira/browse/PIG-2007
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Anitha Raju
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>         Attachments: PIG-2007.patch
>
>
> The below script when executed with version 0.9 fails with parsing error.
> {code}
>  ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
> {code}
> Script1
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A {
>         C = test.TOMAP('key1',$1)#'key1';
>         generate C as C;
> }
> {code}
> The above happens when, in a nested foreach i refer to a map key directly from a udf result
> The same would work if one executes without the nested foreach.
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
> dump B1;
> {code}
> Script1 works well with 0.8.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2007) Parsing error when map key referred directly from udf in nested foreach

Posted by "Xuefu Zhang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031348#comment-13031348 ] 

Xuefu Zhang commented on PIG-2007:
----------------------------------

PIG-2007-2.patch is committed to 0.9.0.

> Parsing error when map key referred directly from udf in nested foreach 
> ------------------------------------------------------------------------
>
>                 Key: PIG-2007
>                 URL: https://issues.apache.org/jira/browse/PIG-2007
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Anitha Raju
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>         Attachments: PIG-2007-2.patch, PIG-2007.patch
>
>
> The below script when executed with version 0.9 fails with parsing error.
> {code}
>  ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
> {code}
> Script1
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A {
>         C = test.TOMAP('key1',$1)#'key1';
>         generate C as C;
> }
> {code}
> The above happens when, in a nested foreach i refer to a map key directly from a udf result
> The same would work if one executes without the nested foreach.
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
> dump B1;
> {code}
> Script1 works well with 0.8.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2007) Parsing error when map key referred directly from udf in nested foreach

Posted by "Xuefu Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xuefu Zhang updated PIG-2007:
-----------------------------

    Attachment: PIG-2007-2.patch

Patch PIG-2007-2.patch is what was actually committed to the trunk. This needs to be for 0.9 as well.

> Parsing error when map key referred directly from udf in nested foreach 
> ------------------------------------------------------------------------
>
>                 Key: PIG-2007
>                 URL: https://issues.apache.org/jira/browse/PIG-2007
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Anitha Raju
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>         Attachments: PIG-2007-2.patch, PIG-2007.patch
>
>
> The below script when executed with version 0.9 fails with parsing error.
> {code}
>  ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
> {code}
> Script1
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A {
>         C = test.TOMAP('key1',$1)#'key1';
>         generate C as C;
> }
> {code}
> The above happens when, in a nested foreach i refer to a map key directly from a udf result
> The same would work if one executes without the nested foreach.
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
> dump B1;
> {code}
> Script1 works well with 0.8.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2007) Parsing error when map key referred directly from udf in nested foreach

Posted by "Xuefu Zhang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13023308#comment-13023308 ] 

Xuefu Zhang commented on PIG-2007:
----------------------------------

Patch is committed to trunk.

> Parsing error when map key referred directly from udf in nested foreach 
> ------------------------------------------------------------------------
>
>                 Key: PIG-2007
>                 URL: https://issues.apache.org/jira/browse/PIG-2007
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Anitha Raju
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>         Attachments: PIG-2007.patch
>
>
> The below script when executed with version 0.9 fails with parsing error.
> {code}
>  ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
> {code}
> Script1
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A {
>         C = test.TOMAP('key1',$1)#'key1';
>         generate C as C;
> }
> {code}
> The above happens when, in a nested foreach i refer to a map key directly from a udf result
> The same would work if one executes without the nested foreach.
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
> dump B1;
> {code}
> Script1 works well with 0.8.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2007) Parsing error when map key referred directly from udf in nested foreach

Posted by "Xuefu Zhang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13023305#comment-13023305 ] 

Xuefu Zhang commented on PIG-2007:
----------------------------------

Test-patch run: (release warnings are ignored as there are no new files introduced.)

     [exec] -1 overall.
     [exec]
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec]
     [exec]     +1 tests included.  The patch appears to include 3 new or modified tests.
     [exec]
     [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
     [exec]
     [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
     [exec]
     [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
     [exec]
     [exec]     -1 release audit.  The applied patch generated 568 release audit warnings (more than the trunk's current 566 warnings).


> Parsing error when map key referred directly from udf in nested foreach 
> ------------------------------------------------------------------------
>
>                 Key: PIG-2007
>                 URL: https://issues.apache.org/jira/browse/PIG-2007
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Anitha Raju
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>         Attachments: PIG-2007.patch
>
>
> The below script when executed with version 0.9 fails with parsing error.
> {code}
>  ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
> {code}
> Script1
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A {
>         C = test.TOMAP('key1',$1)#'key1';
>         generate C as C;
> }
> {code}
> The above happens when, in a nested foreach i refer to a map key directly from a udf result
> The same would work if one executes without the nested foreach.
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
> dump B1;
> {code}
> Script1 works well with 0.8.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (PIG-2007) Parsing error when map key referred directly from udf in nested foreach

Posted by "Xuefu Zhang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xuefu Zhang resolved PIG-2007.
------------------------------

    Resolution: Fixed

> Parsing error when map key referred directly from udf in nested foreach 
> ------------------------------------------------------------------------
>
>                 Key: PIG-2007
>                 URL: https://issues.apache.org/jira/browse/PIG-2007
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Anitha Raju
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>         Attachments: PIG-2007.patch
>
>
> The below script when executed with version 0.9 fails with parsing error.
> {code}
>  ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
> {code}
> Script1
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A {
>         C = test.TOMAP('key1',$1)#'key1';
>         generate C as C;
> }
> {code}
> The above happens when, in a nested foreach i refer to a map key directly from a udf result
> The same would work if one executes without the nested foreach.
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
> dump B1;
> {code}
> Script1 works well with 0.8.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2007) Parsing error when map key referred directly from udf in nested foreach

Posted by "Thejas M Nair (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025002#comment-13025002 ] 

Thejas M Nair commented on PIG-2007:
------------------------------------

+1

> Parsing error when map key referred directly from udf in nested foreach 
> ------------------------------------------------------------------------
>
>                 Key: PIG-2007
>                 URL: https://issues.apache.org/jira/browse/PIG-2007
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Anitha Raju
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>         Attachments: PIG-2007.patch
>
>
> The below script when executed with version 0.9 fails with parsing error.
> {code}
>  ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
> {code}
> Script1
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A {
>         C = test.TOMAP('key1',$1)#'key1';
>         generate C as C;
> }
> {code}
> The above happens when, in a nested foreach i refer to a map key directly from a udf result
> The same would work if one executes without the nested foreach.
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
> dump B1;
> {code}
> Script1 works well with 0.8.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2007) Parsing error when map key referred directly from udf in nested foreach

Posted by "Xuefu Zhang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025075#comment-13025075 ] 

Xuefu Zhang commented on PIG-2007:
----------------------------------

Patch is committed to 0.9 as well.

> Parsing error when map key referred directly from udf in nested foreach 
> ------------------------------------------------------------------------
>
>                 Key: PIG-2007
>                 URL: https://issues.apache.org/jira/browse/PIG-2007
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Anitha Raju
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>         Attachments: PIG-2007.patch
>
>
> The below script when executed with version 0.9 fails with parsing error.
> {code}
>  ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
> {code}
> Script1
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A {
>         C = test.TOMAP('key1',$1)#'key1';
>         generate C as C;
> }
> {code}
> The above happens when, in a nested foreach i refer to a map key directly from a udf result
> The same would work if one executes without the nested foreach.
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
> dump B1;
> {code}
> Script1 works well with 0.8.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2007) Parsing error when map key referred directly from udf in nested foreach

Posted by "Thejas M Nair (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031322#comment-13031322 ] 

Thejas M Nair commented on PIG-2007:
------------------------------------

+1 for PIG-2007-2.patch

> Parsing error when map key referred directly from udf in nested foreach 
> ------------------------------------------------------------------------
>
>                 Key: PIG-2007
>                 URL: https://issues.apache.org/jira/browse/PIG-2007
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Anitha Raju
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>         Attachments: PIG-2007-2.patch, PIG-2007.patch
>
>
> The below script when executed with version 0.9 fails with parsing error.
> {code}
>  ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
> {code}
> Script1
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A {
>         C = test.TOMAP('key1',$1)#'key1';
>         generate C as C;
> }
> {code}
> The above happens when, in a nested foreach i refer to a map key directly from a udf result
> The same would work if one executes without the nested foreach.
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
> dump B1;
> {code}
> Script1 works well with 0.8.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2007) Parsing error when map key referred directly from udf in nested foreach

Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olga Natkovich updated PIG-2007:
--------------------------------

      Description: 
The below script when executed with version 0.9 fails with parsing error.

{code}
 ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
{code}

Script1
{code}
register myudf.jar;
A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
B1 = foreach A {
        C = test.TOMAP('key1',$1)#'key1';
        generate C as C;
}
{code}

The above happens when, in a nested foreach i refer to a map key directly from a udf result

The same would work if one executes without the nested foreach.
{code}
register myudf.jar;
A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
dump B1;
{code}

Script1 works well with 0.8.


  was:

The below script when executed with version 0.9 fails with parsing error.

{code}
 ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
{code}

Script1
{code}
register myudf.jar;
A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
B1 = foreach A {
        C = test.TOMAP('key1',$1)#'key1';
        generate C as C;
}
{code}

The above happens when, in a nested foreach i refer to a map key directly from a udf result

The same would work if one executes without the nested foreach.
{code}
register myudf.jar;
A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
dump B1;
{code}

Script1 works well with 0.8.


    Fix Version/s: 0.9.0
         Assignee: Xuefu Zhang

> Parsing error when map key referred directly from udf in nested foreach 
> ------------------------------------------------------------------------
>
>                 Key: PIG-2007
>                 URL: https://issues.apache.org/jira/browse/PIG-2007
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Anitha Raju
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>
> The below script when executed with version 0.9 fails with parsing error.
> {code}
>  ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
> {code}
> Script1
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A {
>         C = test.TOMAP('key1',$1)#'key1';
>         generate C as C;
> }
> {code}
> The above happens when, in a nested foreach i refer to a map key directly from a udf result
> The same would work if one executes without the nested foreach.
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
> dump B1;
> {code}
> Script1 works well with 0.8.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2007) Parsing error when map key referred directly from udf in nested foreach

Posted by "Xuefu Zhang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIG-2007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13023312#comment-13023312 ] 

Xuefu Zhang commented on PIG-2007:
----------------------------------

Sorry but just realized that the patch hasn't been reviewed yet. I mistaken it for another one which was reviewed.

I have asked Thejas to review this patch.

> Parsing error when map key referred directly from udf in nested foreach 
> ------------------------------------------------------------------------
>
>                 Key: PIG-2007
>                 URL: https://issues.apache.org/jira/browse/PIG-2007
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Anitha Raju
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>         Attachments: PIG-2007.patch
>
>
> The below script when executed with version 0.9 fails with parsing error.
> {code}
>  ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. <line 2, column 15> mismatched input '{' expecting GENERATE
> {code}
> Script1
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A {
>         C = test.TOMAP('key1',$1)#'key1';
>         generate C as C;
> }
> {code}
> The above happens when, in a nested foreach i refer to a map key directly from a udf result
> The same would work if one executes without the nested foreach.
> {code}
> register myudf.jar;
> A = load 'test.txt' using PigStorage() as (a:int,b:chararray);
> B1 = foreach A generate test.TOMAP('key1',$1)#'key1';
> dump B1;
> {code}
> Script1 works well with 0.8.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira