You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Alan Gates (JIRA)" <ji...@apache.org> on 2008/06/13 16:16:45 UTC

[jira] Commented: (PIG-267) Don't substitute parameters inside comments

    [ 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.