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

Scope of param substitution for run/exec commands

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.17.0
    • None
    • None
    • Incompatible change, Reviewed
    • With run/exec command, parameters are now scoped and caller would not see the parameters declared within the callee's scripts.

    Description

      After PIG-3359, pig param substitution became global in that parameter declared in the pig script called from run or exec would live after that script finishes.

      This created an interesting situation.

      test1.pig
      exec -param output=/tmp/deleteme111 test1_1.pig
      exec -param output=/tmp/deleteme222 test1_1.pig
      
      test1_1.pig
      %default myout '$output.out';
      A = load 'input.txt' as (a0:int);
      store A into '$myout';
      

      Running test1.pig would try to run two jobs that both tries to write to /tmp/deleteme111 and fail. (Second param output=/tmp/deleteme222 is ignored.)

      Attachments

        1. pig-4897-v01-notestyet.patch
          3 kB
          Koji Noguchi
        2. pig-4897-v02.patch
          7 kB
          Koji Noguchi
        3. pig-4897-v03.patch
          7 kB
          Koji Noguchi
        4. pig-4897-v04.patch
          14 kB
          Koji Noguchi
        5. pig-4897-v05.patch
          15 kB
          Koji Noguchi
        6. pig-4897-v06.patch
          18 kB
          Koji Noguchi
        7. pig-4897-v07.patch
          18 kB
          Koji Noguchi
        8. pig-4897-v08.patch
          19 kB
          Koji Noguchi
        9. pig-4897-v09.patch
          21 kB
          Koji Noguchi

        Issue Links

          Activity

            People

              knoguchi Koji Noguchi
              knoguchi Koji Noguchi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: