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

Parameter substitution skipped with glob on register

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.16.0
    • None
    • None
    • Reviewed

    Description

      For a script with globbing on register followed by multi-line comments, parameter substitution doesn't work.

      test.pig
      register /Users/knoguchi/mydir/*.jar; 
      
      A = load '$input' as (a1:int);
      /* comment here */
      store A into '$output';
      
      

      Trying to run this would result in

      org.apache.pig.backend.executionengine.ExecException: ERROR 2118: Input path does not exist: file:/Users/knoguchi/git/pig/$input

      Running with -dryrun, we can see that parameter between the globbing and the multi-line style comment is ignored.

      % pig -dryrun  -param input=input.txt -param output=output.txt  test.pig
      ...
      2016-05-05 14:04:34,613 [main] INFO  org.apache.pig.Main - Dry run completed. Substituted pig script is at test.pig.substituted
      ...
      % cat test.pig.substituted
      register /Users/knoguchi/mydir/*.jar;
      
      A = load '$input' as (a1:int);
      /* comment here */
      store A into 'output.txt';
      
      %
      

      Attachments

        1. pig-4887-v02.patch
          41 kB
          Koji Noguchi
        2. pig-4887-v01.patch
          40 kB
          Koji Noguchi

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment