You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Koji Noguchi (JIRA)" <ji...@apache.org> on 2012/08/22 23:54:42 UTC

[jira] [Created] (PIG-2887) Macro cannot handle negative number

Koji Noguchi created PIG-2887:
---------------------------------

             Summary: Macro cannot handle negative number
                 Key: PIG-2887
                 URL: https://issues.apache.org/jira/browse/PIG-2887
             Project: Pig
          Issue Type: Bug
          Components: parser
            Reporter: Koji Noguchi
            Assignee: Koji Noguchi
            Priority: Minor


Whenever the macro includes some negative number, parser bails out with "/AliasMasker.g:
node from line __:__ mismatched tree node: 1 expecting <DOWN>"



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2887) Macro cannot handle negative number

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

Koji Noguchi updated PIG-2887:
------------------------------

    Status: Patch Available  (was: Open)
    
> Macro cannot handle negative number
> -----------------------------------
>
>                 Key: PIG-2887
>                 URL: https://issues.apache.org/jira/browse/PIG-2887
>             Project: Pig
>          Issue Type: Bug
>          Components: parser
>            Reporter: Koji Noguchi
>            Assignee: Koji Noguchi
>            Priority: Minor
>         Attachments: pig-2887-v1.patch
>
>
> Whenever the macro includes some negative number, parser bails out with "/AliasMasker.g:
> node from line __:__ mismatched tree node: 1 expecting <DOWN>"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIG-2887) Macro cannot handle negative number

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

Alan Gates updated PIG-2887:
----------------------------

       Resolution: Fixed
    Fix Version/s: 0.11
           Status: Resolved  (was: Patch Available)

Patch checked in.  Thanks Koji.
                
> Macro cannot handle negative number
> -----------------------------------
>
>                 Key: PIG-2887
>                 URL: https://issues.apache.org/jira/browse/PIG-2887
>             Project: Pig
>          Issue Type: Bug
>          Components: parser
>            Reporter: Koji Noguchi
>            Assignee: Koji Noguchi
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: pig-2887-v1.patch
>
>
> Whenever the macro includes some negative number, parser bails out with "/AliasMasker.g:
> node from line __:__ mismatched tree node: 1 expecting <DOWN>"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIG-2887) Macro cannot handle negative number

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

Koji Noguchi commented on PIG-2887:
-----------------------------------

Sample input and error message
{noformat}
% cat sample.pig
define moreThanMinus1(myinput) RETURNS myoutput {
        $myoutput = filter $myinput by points > -1;
}

A = LOAD 'tmp/input.txt' as (user:chararray,points:int); 
B = moreThanMinus1(A);
DUMP B;

% java -cp org.apache.pig.Main -x local -dryrun sample.pig 
...
2012-08-22 17:53:51,650 [main] ERROR org.apache.pig.Main - ERROR 1200: <file sample.pig.substituted, line 6> Failed to mask macro 'moreThanMinus1'. Reason: /Users/knoguchi/git/pig/src/org/apache/pig/parser/AliasMasker.g: node from line 2:27 mismatched tree node: 1 expecting <DOWN>
macro content: 
        B = filter A by points > -1;
...
% 
{noformat}
                
> Macro cannot handle negative number
> -----------------------------------
>
>                 Key: PIG-2887
>                 URL: https://issues.apache.org/jira/browse/PIG-2887
>             Project: Pig
>          Issue Type: Bug
>          Components: parser
>            Reporter: Koji Noguchi
>            Assignee: Koji Noguchi
>            Priority: Minor
>
> Whenever the macro includes some negative number, parser bails out with "/AliasMasker.g:
> node from line __:__ mismatched tree node: 1 expecting <DOWN>"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (PIG-2887) Macro cannot handle negative number

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

Koji Noguchi updated PIG-2887:
------------------------------

    Attachment: pig-2887-v1.patch

Updated AliasMasker.g based on QueryParser.g and also added a testcase.

(I just started learning pig but do we need to have such similar grammer files?)

{noformat}
% grep -A1 "THIS FILE IS BASED ON QueryParser.g"  src/org/apache/pig/parser/*.g
src/org/apache/pig/parser/AliasMasker.g: * NOTE: THIS FILE IS BASED ON QueryParser.g, SO IF YOU CHANGE THAT FILE, YOU WILL 
src/org/apache/pig/parser/AliasMasker.g- *       PROBABLY NEED TO MAKE CORRESPONDING CHANGES TO THIS FILE AS WELL.
--
src/org/apache/pig/parser/AstPrinter.g: * NOTE: THIS FILE IS BASED ON QueryParser.g, SO IF YOU CHANGE THAT FILE, YOU WILL 
src/org/apache/pig/parser/AstPrinter.g- *       PROBABLY NEED TO MAKE CORRESPONDING CHANGES TO THIS FILE AS WELL.
--
src/org/apache/pig/parser/AstValidator.g: * NOTE: THIS FILE IS BASED ON QueryParser.g, SO IF YOU CHANGE THAT FILE, YOU WILL 
src/org/apache/pig/parser/AstValidator.g- *       PROBABLY NEED TO MAKE CORRESPONDING CHANGES TO THIS FILE AS WELL.
--
src/org/apache/pig/parser/LogicalPlanGenerator.g: * NOTE: THIS FILE IS BASED ON QueryParser.g, SO IF YOU CHANGE THAT FILE, YOU WILL 
src/org/apache/pig/parser/LogicalPlanGenerator.g- *       PROBABLY NEED TO MAKE CORRESPONDING CHANGES TO THIS FILE AS WELL.
% 
{noformat} 
                
> Macro cannot handle negative number
> -----------------------------------
>
>                 Key: PIG-2887
>                 URL: https://issues.apache.org/jira/browse/PIG-2887
>             Project: Pig
>          Issue Type: Bug
>          Components: parser
>            Reporter: Koji Noguchi
>            Assignee: Koji Noguchi
>            Priority: Minor
>         Attachments: pig-2887-v1.patch
>
>
> Whenever the macro includes some negative number, parser bails out with "/AliasMasker.g:
> node from line __:__ mismatched tree node: 1 expecting <DOWN>"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIG-2887) Macro cannot handle negative number

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

Alan Gates commented on PIG-2887:
---------------------------------

Code looks good.  I'll run the relevant tests and check in if all is good.
                
> Macro cannot handle negative number
> -----------------------------------
>
>                 Key: PIG-2887
>                 URL: https://issues.apache.org/jira/browse/PIG-2887
>             Project: Pig
>          Issue Type: Bug
>          Components: parser
>            Reporter: Koji Noguchi
>            Assignee: Koji Noguchi
>            Priority: Minor
>         Attachments: pig-2887-v1.patch
>
>
> Whenever the macro includes some negative number, parser bails out with "/AliasMasker.g:
> node from line __:__ mismatched tree node: 1 expecting <DOWN>"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira