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

bin/pig should not modify user args

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.8.0
    • 0.10.0
    • None
    • None
    • bin/pig handles args with spaces correctly.

    Description

      PIG launcher script (bin/pig) joins all the user arguments in one string. This leads to confusion when the arguments contain spaces.
      i.e. 'bin/pig -p sub="i > 2"' is should not same as 'bin/pig -p "sub" "i" ">" "2"', but it is.

      Attachments

        1. PIG-2162.patch
          0.9 kB
          Raghu Angadi

        Issue Links

          Activity

            rangadi Raghu Angadi added a comment -

            patch preservers the user args.

            rangadi Raghu Angadi added a comment - patch preservers the user args.
            rangadi Raghu Angadi added a comment -

            There is a related issue with parsing of params inside PIG. We need to escape '=' and any space before '=' which specifying params on command line, but there is is no such restriction for using '%default'. We might need merge the parser for these two. This might a relatively minor tweak to ParamLoader.jj.

            to get equivalent of %declare cond 'i == 2' we need to use {{ -p cond='i\ \=\= 2' }}

            rangadi Raghu Angadi added a comment - There is a related issue with parsing of params inside PIG. We need to escape '=' and any space before '=' which specifying params on command line, but there is is no such restriction for using '%default'. We might need merge the parser for these two. This might a relatively minor tweak to ParamLoader.jj. to get equivalent of %declare cond 'i == 2' we need to use {{ -p cond='i\ \=\= 2' }}
            thejas Thejas Nair added a comment -

            +1. Patch committed to trunk.
            Thanks Raghu!
            Can you please open a new jira to track the issue of parsing of '=' in parameters ?

            thejas Thejas Nair added a comment - +1. Patch committed to trunk. Thanks Raghu! Can you please open a new jira to track the issue of parsing of '=' in parameters ?
            rangadi Raghu Angadi added a comment -

            Thanks Thejas. filed PIG-2180.

            rangadi Raghu Angadi added a comment - Thanks Thejas. filed PIG-2180 .

            People

              rangadi Raghu Angadi
              rangadi Raghu Angadi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: