Pig
  1. Pig
  2. PIG-598

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.2.0
    • Fix Version/s: 0.7.0
    • Component/s: impl
    • Labels:
      None

      Description

      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.

      -- $NOT_A_PARAMETER
      
      -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)
      
      1. PIG-598.1.patch
        27 kB
        Thejas M Nair
      2. PIG-598.patch
        24 kB
        Thejas M Nair

        Issue Links

          Activity

          David Ciemiewicz created issue -
          Nigel Daley made changes -
          Field Original Value New Value
          Affects Version/s 0.2.0 [ 12313783 ]
          Affects Version/s 1.0.0 [ 12313288 ]
          Alan Gates made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          Viraj Bhat made changes -
          Link This issue is related to PIG-267 [ PIG-267 ]
          Thejas M Nair made changes -
          Link This issue is duplicated by PIG-267 [ PIG-267 ]
          Thejas M Nair made changes -
          Assignee Thejas M Nair [ thejas ]
          Thejas M Nair made changes -
          Attachment PIG-598.patch [ 12422928 ]
          Olga Natkovich made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Thejas M Nair made changes -
          Attachment PIG-598.patch [ 12422928 ]
          Thejas M Nair made changes -
          Attachment PIG-598.patch [ 12423034 ]
          Thejas M Nair made changes -
          Patch Info [Patch Available]
          Thejas M Nair made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Thejas M Nair made changes -
          Patch Info [Patch Available]
          Thejas M Nair made changes -
          Patch Info [Patch Available]
          Thejas M Nair made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Thejas M Nair made changes -
          Patch Info [Patch Available]
          Thejas M Nair made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Thejas M Nair made changes -
          Attachment PIG-598.1.patch [ 12425862 ]
          Thejas M Nair made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Olga Natkovich made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Olga Natkovich made changes -
          Fix Version/s 0.7.0 [ 12314397 ]
          Daniel Dai made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Thejas M Nair
              Reporter:
              David Ciemiewicz
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development