Grokbase Groups Pig dev June 2008
FAQ
Don't substitute parameters inside comments
-------------------------------------------

Key: PIG-267
URL: https://issues.apache.org/jira/browse/PIG-267
Project: Pig
Issue Type: Improvement
Reporter: Amir Youssefi


A script with $x in comments fails because Pig thinks it's an undefined parameter. One approach to address it is to skip substitution for comments.

java.lang.RuntimeException: Undefined parameter : x
at org.apache.pig.tools.parameters.PreprocessorContext.substitute(PreprocessorContext.java:221)
at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.parsePigFile(ParameterSubstitutionPreprocessor.java:106)
at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.genSubstitutedFile(ParameterSubstitutionPreprocessor.java:86)
at org.apache.pig.Main.runParamPreprocessor(Main.java:382)
at org.apache.pig.Main.main(Main.java:284)




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

Search Discussions

  • Amir Youssefi (JIRA) at Jun 13, 2008 at 8:15 am
    [ https://issues.apache.org/jira/browse/PIG-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Amir Youssefi updated PIG-267:
    ------------------------------

    Priority: Trivial (was: Major)
    Don't substitute parameters inside comments
    -------------------------------------------

    Key: PIG-267
    URL: https://issues.apache.org/jira/browse/PIG-267
    Project: Pig
    Issue Type: Improvement
    Reporter: Amir Youssefi
    Priority: Trivial

    A script with $x in comments fails because Pig thinks it's an undefined parameter. One approach to address it is to skip substitution for comments.
    java.lang.RuntimeException: Undefined parameter : x
    at org.apache.pig.tools.parameters.PreprocessorContext.substitute(PreprocessorContext.java:221)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.parsePigFile(ParameterSubstitutionPreprocessor.java:106)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.genSubstitutedFile(ParameterSubstitutionPreprocessor.java:86)
    at org.apache.pig.Main.runParamPreprocessor(Main.java:382)
    at org.apache.pig.Main.main(Main.java:284)
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Pi Song (JIRA) at Jun 13, 2008 at 12:07 pm
    [ https://issues.apache.org/jira/browse/PIG-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Pi Song updated PIG-267:
    ------------------------

    Issue Type: Bug (was: Improvement)
    Don't substitute parameters inside comments
    -------------------------------------------

    Key: PIG-267
    URL: https://issues.apache.org/jira/browse/PIG-267
    Project: Pig
    Issue Type: Bug
    Reporter: Amir Youssefi
    Priority: Trivial

    A script with $x in comments fails because Pig thinks it's an undefined parameter. One approach to address it is to skip substitution for comments.
    java.lang.RuntimeException: Undefined parameter : x
    at org.apache.pig.tools.parameters.PreprocessorContext.substitute(PreprocessorContext.java:221)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.parsePigFile(ParameterSubstitutionPreprocessor.java:106)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.genSubstitutedFile(ParameterSubstitutionPreprocessor.java:86)
    at org.apache.pig.Main.runParamPreprocessor(Main.java:382)
    at org.apache.pig.Main.main(Main.java:284)
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Pi Song (JIRA) at Jun 13, 2008 at 12:15 pm
    [ https://issues.apache.org/jira/browse/PIG-267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Pi Song updated PIG-267:
    ------------------------

    Attachment: Pig267_ParamFix.patch

    The patch.
    Tested. Please review.
    Don't substitute parameters inside comments
    -------------------------------------------

    Key: PIG-267
    URL: https://issues.apache.org/jira/browse/PIG-267
    Project: Pig
    Issue Type: Bug
    Reporter: Amir Youssefi
    Priority: Trivial
    Attachments: Pig267_ParamFix.patch


    A script with $x in comments fails because Pig thinks it's an undefined parameter. One approach to address it is to skip substitution for comments.
    java.lang.RuntimeException: Undefined parameter : x
    at org.apache.pig.tools.parameters.PreprocessorContext.substitute(PreprocessorContext.java:221)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.parsePigFile(ParameterSubstitutionPreprocessor.java:106)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.genSubstitutedFile(ParameterSubstitutionPreprocessor.java:86)
    at org.apache.pig.Main.runParamPreprocessor(Main.java:382)
    at org.apache.pig.Main.main(Main.java:284)
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Alan Gates (JIRA) at Jun 13, 2008 at 2:17 pm
    [ https://issues.apache.org/jira/browse/PIG-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604891#action_12604891 ]

    Alan Gates commented on PIG-267:
    --------------------------------

    {noformat}
    The patch checks for lines that start with #.
    But # is only the comment operator for preprocessor files.
    Comments in pig can start with -- or be enclosed C
    style in /* */. This patch needs to handle -- and /* */ rather than #.
    {noformat}
    Don't substitute parameters inside comments
    -------------------------------------------

    Key: PIG-267
    URL: https://issues.apache.org/jira/browse/PIG-267
    Project: Pig
    Issue Type: Bug
    Reporter: Amir Youssefi
    Priority: Trivial
    Attachments: Pig267_ParamFix.patch


    A script with $x in comments fails because Pig thinks it's an undefined parameter. One approach to address it is to skip substitution for comments.
    java.lang.RuntimeException: Undefined parameter : x
    at org.apache.pig.tools.parameters.PreprocessorContext.substitute(PreprocessorContext.java:221)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.parsePigFile(ParameterSubstitutionPreprocessor.java:106)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.genSubstitutedFile(ParameterSubstitutionPreprocessor.java:86)
    at org.apache.pig.Main.runParamPreprocessor(Main.java:382)
    at org.apache.pig.Main.main(Main.java:284)
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Pi Song (JIRA) at Jun 13, 2008 at 3:25 pm
    [ https://issues.apache.org/jira/browse/PIG-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604912#action_12604912 ]

    Pi Song commented on PIG-267:
    -----------------------------

    I see. Will fix that.
    Don't substitute parameters inside comments
    -------------------------------------------

    Key: PIG-267
    URL: https://issues.apache.org/jira/browse/PIG-267
    Project: Pig
    Issue Type: Bug
    Reporter: Amir Youssefi
    Priority: Trivial
    Attachments: Pig267_ParamFix.patch


    A script with $x in comments fails because Pig thinks it's an undefined parameter. One approach to address it is to skip substitution for comments.
    java.lang.RuntimeException: Undefined parameter : x
    at org.apache.pig.tools.parameters.PreprocessorContext.substitute(PreprocessorContext.java:221)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.parsePigFile(ParameterSubstitutionPreprocessor.java:106)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.genSubstitutedFile(ParameterSubstitutionPreprocessor.java:86)
    at org.apache.pig.Main.runParamPreprocessor(Main.java:382)
    at org.apache.pig.Main.main(Main.java:284)
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Pi Song (JIRA) at Jun 16, 2008 at 10:32 am
    [ https://issues.apache.org/jira/browse/PIG-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605252#action_12605252 ]

    Pi Song commented on PIG-267:
    -----------------------------

    Referring to discussion to PIG-58, seems like this is already the expected behavior?
    Don't substitute parameters inside comments
    -------------------------------------------

    Key: PIG-267
    URL: https://issues.apache.org/jira/browse/PIG-267
    Project: Pig
    Issue Type: Bug
    Reporter: Amir Youssefi
    Priority: Trivial
    Attachments: Pig267_ParamFix.patch


    A script with $x in comments fails because Pig thinks it's an undefined parameter. One approach to address it is to skip substitution for comments.
    java.lang.RuntimeException: Undefined parameter : x
    at org.apache.pig.tools.parameters.PreprocessorContext.substitute(PreprocessorContext.java:221)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.parsePigFile(ParameterSubstitutionPreprocessor.java:106)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.genSubstitutedFile(ParameterSubstitutionPreprocessor.java:86)
    at org.apache.pig.Main.runParamPreprocessor(Main.java:382)
    at org.apache.pig.Main.main(Main.java:284)
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Pi Song (JIRA) at Jun 16, 2008 at 10:32 am
    [ https://issues.apache.org/jira/browse/PIG-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605252#action_12605252 ]

    pi_song edited comment on PIG-267 at 6/16/08 3:31 AM:
    ------------------------------------------------------

    Referring to discussion in PIG-58, seems like this is already the expected behavior?

    was (Author: pi_song):
    Referring to discussion to PIG-58, seems like this is already the expected behavior?
    Don't substitute parameters inside comments
    -------------------------------------------

    Key: PIG-267
    URL: https://issues.apache.org/jira/browse/PIG-267
    Project: Pig
    Issue Type: Bug
    Reporter: Amir Youssefi
    Priority: Trivial
    Attachments: Pig267_ParamFix.patch


    A script with $x in comments fails because Pig thinks it's an undefined parameter. One approach to address it is to skip substitution for comments.
    java.lang.RuntimeException: Undefined parameter : x
    at org.apache.pig.tools.parameters.PreprocessorContext.substitute(PreprocessorContext.java:221)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.parsePigFile(ParameterSubstitutionPreprocessor.java:106)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.genSubstitutedFile(ParameterSubstitutionPreprocessor.java:86)
    at org.apache.pig.Main.runParamPreprocessor(Main.java:382)
    at org.apache.pig.Main.main(Main.java:284)
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Olga Natkovich (JIRA) at Jun 16, 2008 at 6:34 pm
    [ https://issues.apache.org/jira/browse/PIG-267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12605368#action_12605368 ]

    Olga Natkovich commented on PIG-267:
    ------------------------------------

    Hi Pi, yes the comment their is a bit misleading. Alan is right though that we need to skip all comments supported by Pig.
    Don't substitute parameters inside comments
    -------------------------------------------

    Key: PIG-267
    URL: https://issues.apache.org/jira/browse/PIG-267
    Project: Pig
    Issue Type: Bug
    Reporter: Amir Youssefi
    Priority: Trivial
    Attachments: Pig267_ParamFix.patch


    A script with $x in comments fails because Pig thinks it's an undefined parameter. One approach to address it is to skip substitution for comments.
    java.lang.RuntimeException: Undefined parameter : x
    at org.apache.pig.tools.parameters.PreprocessorContext.substitute(PreprocessorContext.java:221)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.parsePigFile(ParameterSubstitutionPreprocessor.java:106)
    at org.apache.pig.tools.parameters.ParameterSubstitutionPreprocessor.genSubstitutedFile(ParameterSubstitutionPreprocessor.java:86)
    at org.apache.pig.Main.runParamPreprocessor(Main.java:382)
    at org.apache.pig.Main.main(Main.java:284)
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriespig, hadoop
postedJun 13, '08 at 8:15a
activeJun 16, '08 at 6:34p
posts9
users1
websitepig.apache.org

1 user in discussion

Olga Natkovich (JIRA): 9 posts

People

Translate

site design / logo © 2022 Grokbase