Grokbase Groups Pig dev January 2009
FAQ
Parameter substitution ($PARAMETER) should not be performed in comments
-----------------------------------------------------------------------

Key: PIG-598
URL: https://issues.apache.org/jira/browse/PIG-598
Project: Pig
Issue Type: Bug
Components: impl
Affects Versions: types_branch
Reporter: David Ciemiewicz
Priority: Minor


Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.

This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.

This I think it would be really good if parameter substitution was not performed in comments.

{code}
-- $NOT_A_PARAMETER
{code}

{code}
-bash-3.00$ pig -exectype local -latest comment.pig
USING: /grid/0/gs/pig/current
java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
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:394)
at org.apache.pig.Main.main(Main.java:296)
{code}

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

Search Discussions

  • George Mavromatis (JIRA) at Apr 24, 2009 at 9:35 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702563#action_12702563 ]

    George Mavromatis commented on PIG-598:
    ---------------------------------------

    This has been flagged as minor, I think that's a rather serious and elementary one. It takes out the ability to comment/uncomment parameters and creates very bizarre error messages to people who are not aware of it. Can we increase priority?
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Priority: Minor

    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    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 Apr 29, 2009 at 12:46 am
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Alan Gates updated PIG-598:
    ---------------------------

    Priority: Major (was: Minor)
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz

    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Oct 22, 2009 at 6:23 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair reassigned PIG-598:
    ---------------------------------

    Assignee: Thejas M Nair
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair

    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Oct 22, 2009 at 6:30 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-598:
    ------------------------------

    Attachment: PIG-598.patch

    With this patch
    - Parameters in comments are no longer substituted
    - Line numbers don't change after parameter substitution, as long as declare/default don't span multiple lines (no multi-line literals etc). This will help in giving accurate line numbers in error messages after parameter substitution.

    Code changes:
    Instead of the parser processing the pig script a line at a time, the whole script is processed at once.
    There are changes in test cases, because original line numbers are now preserved.


    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    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 Oct 22, 2009 at 7:02 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Olga Natkovich updated PIG-598:
    -------------------------------

    Status: Patch Available (was: Open)
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Hadoop QA (JIRA) at Oct 23, 2009 at 2:36 am
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12769032#action_12769032 ]

    Hadoop QA commented on PIG-598:
    -------------------------------

    -1 overall. Here are the results of testing the latest attachment
    http://issues.apache.org/jira/secure/attachment/12422928/PIG-598.patch
    against trunk revision 828891.

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

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

    -1 patch. The patch command could not apply the patch.

    Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h7.grid.sp2.yahoo.net/111/console

    This message is automatically generated.
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Oct 23, 2009 at 5:31 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-598:
    ------------------------------

    Patch Info: [Patch Available]
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Oct 23, 2009 at 5:31 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-598:
    ------------------------------

    Attachment: (was: PIG-598.patch)
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Oct 23, 2009 at 5:31 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-598:
    ------------------------------

    Attachment: PIG-598.patch

    New patch generated after updating svn.
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Oct 27, 2009 at 10:56 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-598:
    ------------------------------

    Status: Open (was: Patch Available)

    Re-submitting patch for hudson.
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Oct 27, 2009 at 10:58 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-598:
    ------------------------------

    Patch Info: [Patch Available]
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Oct 27, 2009 at 10:58 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-598:
    ------------------------------

    Patch Info: (was: [Patch Available])
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Oct 28, 2009 at 5:44 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-598:
    ------------------------------

    Status: Patch Available (was: Open)
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Hadoop QA (JIRA) at Oct 29, 2009 at 8:01 am
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771319#action_12771319 ]

    Hadoop QA commented on PIG-598:
    -------------------------------

    -1 overall. Here are the results of testing the latest attachment
    http://issues.apache.org/jira/secure/attachment/12423034/PIG-598.patch
    against trunk revision 830757.

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

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

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

    -1 javac. The applied patch generated 199 javac compiler warnings (more than the trunk's current 197 warnings).

    +1 findbugs. The patch does not introduce any new Findbugs warnings.

    -1 release audit. The applied patch generated 318 release audit warnings (more than the trunk's current 313 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-h7.grid.sp2.yahoo.net/125/testReport/
    Release audit warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h7.grid.sp2.yahoo.net/125/artifact/trunk/patchprocess/releaseAuditDiffWarnings.txt
    Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h7.grid.sp2.yahoo.net/125/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
    Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h7.grid.sp2.yahoo.net/125/console

    This message is automatically generated.
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Oct 29, 2009 at 2:06 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12771422#action_12771422 ]

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

    bq. -1 javac. The applied patch generated 199 javac compiler warnings (more than the trunk's current 197 warnings).
    The additional warnings are from code generated by javacc, which cannot be fixed in the .jj files.

    bq. -1 release audit. The applied patch generated 318 release audit warnings (more than the trunk's current 313 warnings).
    The release audit warnings are from new test input and benchmark files, because they don't have the apache license header.
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    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 Nov 12, 2009 at 11:31 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777268#action_12777268 ]

    Olga Natkovich commented on PIG-598:
    ------------------------------------

    The code looks reasonable.

    When I tried to run tests with comments (both kind) in the middle of the line - they are not recognized
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Ashutosh Chauhan (JIRA) at Nov 13, 2009 at 1:31 am
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777317#action_12777317 ]

    Ashutosh Chauhan commented on PIG-598:
    --------------------------------------

    One issue I faced while working on PIG-928 was when trying to name variables in ruby bound to java variables. Ruby variable names (in BSF) needs to be prepended with $ as shown below.
    {code}
    define myudf org.apache.pig.scriptedUDFs.GenericEvalFunc('wordtokens','return $input.split();');
    {code}
    Now this $ appearing in the script should not be substituted. But parser tries to substitute it and fails (with error undefined parameter) since param is not specified while invoking Pig. My hack was to 'escape' this $ and then provide param-substiution while invoking the script as -p input=input
    {code}
    define myudf org.apache.pig.scriptedUDFs.GenericEvalFunc('wordtokens','return $$input.split();');
    {code}
    Note extra $. Obviously, if we are thinking of adding pig-928 and accept udfs written in ruby, this will come up as an issue. One possibility is Pig should not try to do substitution if param is not specified on cmd line. I think way it currently is parser scans the script for $ and then tries to do substiution. If substitution was not defined it error outs. I think if it is not specified on cmd line, then parser should ignore it and continue instead of failing.
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Nov 23, 2009 at 6:12 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-598:
    ------------------------------

    Status: Open (was: Patch Available)
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Nov 23, 2009 at 6:12 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-598:
    ------------------------------

    Patch Info: (was: [Patch Available])
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Nov 23, 2009 at 6:16 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781510#action_12781510 ]

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

    bq. One issue I faced while working on PIG-928 was when trying to name variables in ruby bound to java variables.
    Ashutosh,
    You can use "\" to escape parameter substitution . Use 'return \$input.split();' instead of 'return $input.split();' . After parameter substitution, it becomes 'return $input.split();' .


    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Nov 23, 2009 at 6:30 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-598:
    ------------------------------

    Attachment: PIG-598.1.patch

    Additional changes in this patch-
    * Fixed parsing in PigFileParser.jj
    * Modified test input file for testCommentWithParam() - inputComment.pig, to include comments within and at end of statements
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.1.patch, PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Nov 23, 2009 at 6:32 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-598:
    ------------------------------

    Status: Patch Available (was: Open)
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.1.patch, PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Ashutosh Chauhan (JIRA) at Nov 23, 2009 at 7:10 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781546#action_12781546 ]

    Ashutosh Chauhan commented on PIG-598:
    --------------------------------------

    I guess my question is what should be the behavior when $ is specified in the script and no substitution for it is provided. There are two options: a) If Pig encounters a $ and doesn't find a substitution for it, it fails right there.
    b) Pig logs a warning message and continue assuming user wants literal $ and not the substitution.

    Advantage for b) is there will not be a need of escaping. Disadvantage is when no substitution was unintentional, Pig will fail later, possibly with a different error message.
    Disadvantage of a) is it mandates user to escape $, where its possible not to have such requirement. Advantage is a clear error message can be thrown if no substitution was unintentional.

    What do you think which option shall we choose?

    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.1.patch, PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Nov 23, 2009 at 7:28 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781562#action_12781562 ]

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

    I prefer option a. It is just a matter of putting a "\" before the $ in the scripts :)
    I think compared to the cost of time spending debugging a weird error or unexpected output results, the cost of a for the user is trivial.

    Ideally, I think we should support an option where user can change from default behavior (a) to (b) using a commandline switch or a statement in the script.
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.1.patch, PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Ashutosh Chauhan (JIRA) at Nov 23, 2009 at 8:28 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781602#action_12781602 ]

    Ashutosh Chauhan commented on PIG-598:
    --------------------------------------


    bq. compared to the cost of time spending debugging a weird error or unexpected output results, the cost of a for the user is trivial.

    I agree. Catching errors early and providing clear explanation for it is more important then the convenience of not requiring escaping. Thus a) is better.

    bq. we should support an option where user can change from default behavior (a) to (b) using a commandline switch or a statement in the script.

    Adding yet another hook may not be worth the complexity/time. Lets keep this on hold unless someone specifically asks for this.
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.1.patch, PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Hadoop QA (JIRA) at Nov 24, 2009 at 12:07 am
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781705#action_12781705 ]

    Hadoop QA commented on PIG-598:
    -------------------------------

    -1 overall. Here are the results of testing the latest attachment
    http://issues.apache.org/jira/secure/attachment/12425862/PIG-598.1.patch
    against trunk revision 882818.

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

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

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

    -1 javac. The applied patch generated 213 javac compiler warnings (more than the trunk's current 211 warnings).

    +1 findbugs. The patch does not introduce any new Findbugs warnings.

    -1 release audit. The applied patch generated 361 release audit warnings (more than the trunk's current 356 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-h8.grid.sp2.yahoo.net/52/testReport/
    Release audit warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/52/artifact/trunk/patchprocess/releaseAuditDiffWarnings.txt
    Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/52/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
    Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/52/console

    This message is automatically generated.
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.1.patch, PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Thejas M Nair (JIRA) at Nov 24, 2009 at 12:21 am
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781711#action_12781711 ]

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

    bq. -1 javac. The applied patch generated 213 javac compiler warnings (more than the trunk's current 211 warnings).
    The additional warnings are from code generated by javacc, which cannot be fixed in the .jj files.

    bq. -1 release audit. The applied patch generated 361 release audit warnings (more than the trunk's current 356 warnings).
    The release audit warnings are from new test input and benchmark files, because they don't have the apache license header.

    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.1.patch, PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    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 Nov 24, 2009 at 5:13 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Olga Natkovich updated PIG-598:
    -------------------------------

    Resolution: Fixed
    Status: Resolved (was: Patch Available)

    patch committed. Thanks, Thejas for contributing - this change has been long overdue!
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Attachments: PIG-598.1.patch, PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    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 Feb 2, 2010 at 6:04 pm
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Olga Natkovich updated PIG-598:
    -------------------------------

    Fix Version/s: 0.7.0
    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Fix For: 0.7.0

    Attachments: PIG-598.1.patch, PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Daniel Dai (JIRA) at May 14, 2010 at 6:47 am
    [ https://issues.apache.org/jira/browse/PIG-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Daniel Dai closed PIG-598.
    --------------------------

    Parameter substitution ($PARAMETER) should not be performed in comments
    -----------------------------------------------------------------------

    Key: PIG-598
    URL: https://issues.apache.org/jira/browse/PIG-598
    Project: Pig
    Issue Type: Bug
    Components: impl
    Affects Versions: 0.2.0
    Reporter: David Ciemiewicz
    Assignee: Thejas M Nair
    Fix For: 0.7.0

    Attachments: PIG-598.1.patch, PIG-598.patch


    Compiling the following code example will generate an error that $NOT_A_PARAMETER is an Undefined Parameter.
    This is problematic as sometimes you want to comment out parts of your code, including parameters so that you don't have to define them.
    This I think it would be really good if parameter substitution was not performed in comments.
    {code}
    -- $NOT_A_PARAMETER
    {code}
    {code}
    -bash-3.00$ pig -exectype local -latest comment.pig
    USING: /grid/0/gs/pig/current
    java.lang.RuntimeException: Undefined parameter : NOT_A_PARAMETER
    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:394)
    at org.apache.pig.Main.main(Main.java:296)
    {code}
    --
    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
postedJan 6, '09 at 12:26a
activeMay 14, '10 at 6:47a
posts31
users1
websitepig.apache.org

1 user in discussion

Daniel Dai (JIRA): 31 posts

People

Translate

site design / logo © 2022 Grokbase