You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Viraj Bhat (JIRA)" <ji...@apache.org> on 2009/02/05 02:33:59 UTC

[jira] Created: (PIG-656) Use of eval word in the package hierarchy of a UDF causes parse exception

Use of eval word in the package hierarchy of a UDF causes parse exception
-------------------------------------------------------------------------

                 Key: PIG-656
                 URL: https://issues.apache.org/jira/browse/PIG-656
             Project: Pig
          Issue Type: Bug
          Components: documentation, grunt
    Affects Versions: types_branch
            Reporter: Viraj Bhat
             Fix For: types_branch


Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
{code}
register TOKENIZE.jar
my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
describe modules;
grouped = GROUP modules BY $0;
describe grouped;
counts  = FOREACH grouped GENERATE COUNT(modules), group;
ordered = ORDER counts BY $0;
dump ordered;
{code}

The parser complains:
===========================================================================================================================
2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
===========================================================================================================================

I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:

1) Is there documentation on what the EVAL keyword actually is?
2) Is EVAL keyword actually implemented?

Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Aniket Mokashi updated PIG-656:
-------------------------------

    Attachment: pigusergroup656.patch

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.3.0
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, pigusergroup656.patch, reserved.patch, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Hudson commented on PIG-656:
----------------------------

Integrated in Pig-trunk #455 (See [http://hudson.zones.apache.org/hudson/job/Pig-trunk/455/])
    : Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception (milindb via sms)


> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.1
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, reserved.patch, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-656) Use of eval word in the package hierarchy of a UDF causes parse exception

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

Viraj Bhat updated PIG-656:
---------------------------

    Attachment: TOKENIZE.jar

TOKENIZE.jar with java source file included

> Use of eval word in the package hierarchy of a UDF causes parse exception
> -------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: types_branch
>            Reporter: Viraj Bhat
>             Fix For: types_branch
>
>         Attachments: TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Milind Bhandarkar updated PIG-656:
----------------------------------

    Attachment: reserved.patch

This patch allows the use of reserved words in function names. To avoid parsing ambiguity, the first part of the fully qualified function name (i.e. test before the first ".") cannot be a reserved word. But the rest of the parts in fully qualified function names can be any identifier, including a reserved word.

So, for example, with this patch, the statement:

{code}
define X com.yahoo.load();
{code}

or

{code}
modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
{code}

Now compiles and runs perfectly well.

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.1
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, reserved.patch, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Viraj Bhat updated PIG-656:
---------------------------

    Summary: Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception  (was: Use of eval word in the package hierarchy of a UDF causes parse exception)

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>             Fix For: 0.2.0
>
>         Attachments: mywordcount.txt, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Milind Bhandarkar updated PIG-656:
----------------------------------

    Attachment:     (was: reserved.patch)

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.1
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-656) Use of eval word in the package hierarchy of a UDF causes parse exception

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

Viraj Bhat updated PIG-656:
---------------------------

    Attachment: mywordcount.txt

Test data

> Use of eval word in the package hierarchy of a UDF causes parse exception
> -------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: types_branch
>            Reporter: Viraj Bhat
>             Fix For: types_branch
>
>         Attachments: mywordcount.txt, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work started: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Work on PIG-656 started by Milind Bhandarkar.

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.2.0
>
>         Attachments: mywordcount.txt, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Milind Bhandarkar reassigned PIG-656:
-------------------------------------

    Assignee: Milind Bhandarkar

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.2.0
>
>         Attachments: mywordcount.txt, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (PIG-656) Use of eval word in the package hierarchy of a UDF causes parse exception

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

Olga Natkovich resolved PIG-656.
--------------------------------

    Resolution: Invalid

eval is a reserved word in pig.

> Use of eval word in the package hierarchy of a UDF causes parse exception
> -------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: types_branch
>            Reporter: Viraj Bhat
>             Fix For: types_branch
>
>         Attachments: mywordcount.txt, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Hadoop QA commented on PIG-656:
-------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12408857/reserved.patch
  against trunk revision 777708.

    +1 @author.  The patch does not contain any @author tags.

    +0 tests included.  The patch appears to be a documentation patch that doesn't require tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 1 new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/55/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/55/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/55/console

This message is automatically generated.

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.1
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, reserved.patch, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Milind Bhandarkar updated PIG-656:
----------------------------------

    Attachment: reserved.patch

Uploading a modified patch that now includes a test case. The findbugs warning is not new to this patch.

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.1
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, reserved.patch, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (PIG-656) Use of eval word in the package hierarchy of a UDF causes parse exception

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

Viraj Bhat reopened PIG-656:
----------------------------


Documentation should be updated on the eval keyword and what it actually does otherwise the user can be lost trying to find out the error.

> Use of eval word in the package hierarchy of a UDF causes parse exception
> -------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>             Fix For: 0.2.0
>
>         Attachments: mywordcount.txt, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Milind Bhandarkar updated PIG-656:
----------------------------------

    Status: Open  (was: Patch Available)

modifying patch to include test case.

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.1
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Milind Bhandarkar updated PIG-656:
----------------------------------

        Fix Version/s:     (was: 0.2.0)
                       0.3.0
    Affects Version/s:     (was: 0.2.0)
                       0.2.1
               Status: Patch Available  (was: In Progress)

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.1
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, reserved.patch, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Santhosh Srinivasan commented on PIG-656:
-----------------------------------------

+1 for the patch.

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.1
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, reserved.patch, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Aniket Mokashi commented on PIG-656:
------------------------------------

"eq","gt","lt","gte","lte","neq" were missed as part of this fix. Opened jira at https://issues.apache.org/jira/browse/PIG-1517 to track further changes.

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.3.0
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, pigusergroup656.patch, reserved.patch, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-656) Use of eval word in the package hierarchy of a UDF causes parse exception

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

Viraj Bhat commented on PIG-656:
--------------------------------

Another pig parse issue when a udf was defined within a package which had "matches" keywords in its path.

So something like :
define DISTANCE_SCORE mypackage.pig.udf.matches.LevensteinMatchUDF();

gives a parse error

"
ERROR 1000: Error during parsing. Encountered " "matches" "matches "" at 
line 11, column 42.
Was expecting:
     <IDENTIFIER> ...
"

It is possible to have keywords from pig within package names or even  udf - shouldn't pig not be robust to simple grammar disambiguation of  this sort ?

> Use of eval word in the package hierarchy of a UDF causes parse exception
> -------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>             Fix For: 0.2.0
>
>         Attachments: mywordcount.txt, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Milind Bhandarkar updated PIG-656:
----------------------------------

    Status: Patch Available  (was: Open)

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.1
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, reserved.patch, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Hadoop QA commented on PIG-656:
-------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12408885/reserved.patch
  against trunk revision 777708.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    -1 findbugs.  The patch appears to introduce 1 new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/56/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/56/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-minerva.apache.org/56/console

This message is automatically generated.

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.1
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, reserved.patch, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PIG-656) Use of eval word in the package hierarchy of a UDF causes parse exception

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

Viraj Bhat commented on PIG-656:
--------------------------------

Olga the problem with "eval" keyword is that it is not found in the manuals, http://hadoop.apache.org/pig/docs/r0.2.0/piglatin.html. 

The only way the Pig user can get a hold of this keyword is opening the file,  QueryParser.jjt and looking for the following line TOKEN : { <EVAL : "eval"> }

The Pig Manual should list all valid keywords in Pig (implemented or not).

Please let me know.

Viraj

> Use of eval word in the package hierarchy of a UDF causes parse exception
> -------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.0
>            Reporter: Viraj Bhat
>             Fix For: 0.2.0
>
>         Attachments: mywordcount.txt, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (PIG-656) Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception

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

Santhosh Srinivasan updated PIG-656:
------------------------------------

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

Patch has been committed. Milind, thanks for fixing this issue.

> Use of eval or any other keyword in the package hierarchy of a UDF causes parse exception
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-656
>                 URL: https://issues.apache.org/jira/browse/PIG-656
>             Project: Pig
>          Issue Type: Bug
>          Components: documentation, grunt
>    Affects Versions: 0.2.1
>            Reporter: Viraj Bhat
>            Assignee: Milind Bhandarkar
>             Fix For: 0.3.0
>
>         Attachments: mywordcount.txt, reserved.patch, TOKENIZE.jar
>
>
> Consider a Pig script which does something similar to a word count. It uses the built-in TOKENIZE function, but packages it inside a class hierarchy such as "mypackage.eval"
> {code}
> register TOKENIZE.jar
> my_src  = LOAD '/user/viraj/mywordcount.txt' USING PigStorage('\t')  AS (mlist: chararray);
> modules = FOREACH my_src GENERATE FLATTEN(mypackage.eval.TOKENIZE(mlist));
> describe modules;
> grouped = GROUP modules BY $0;
> describe grouped;
> counts  = FOREACH grouped GENERATE COUNT(modules), group;
> ordered = ORDER counts BY $0;
> dump ordered;
> {code}
> The parser complains:
> ===========================================================================================================================
> 2009-02-05 01:17:29,231 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Invalid alias: mypackage in {mlist: chararray}
> ===========================================================================================================================
> I looked at the following source code at (src/org/apache/pig/impl/logicalLayer/parser/QueryParser.jjt) and it seems that : EVAL is a keyword in Pig. Here are some clarifications:
> 1) Is there documentation on what the EVAL keyword actually is?
> 2) Is EVAL keyword actually implemented?
> Viraj

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.