Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-267

Don't substitute parameters inside comments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Duplicate
    • None
    • None
    • None
    • None

    Description

      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)

      Attachments

        1. Pig267_ParamFix.patch
          6 kB
          Pi Song

        Issue Links

          Activity

            People

              Unassigned Unassigned
              amirhyoussefi Amir Youssefi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: