[ https://issues.apache.org/jira/browse/PIG-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030848#comment-13030848 ]
Julien Le Dem commented on PIG-1827: ------------------------------------ After discussing with Richard and looking into the code of PreprocessorContext http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/tools/parameters/PreprocessorContext.java?view=markup There seems to be a bug here: {code} 235 //String litVal = Matcher.quoteReplacement(val); 236 replaced_line = replaced_line.replaceFirst("\\$"+key, val); {code} the replacement (2nd) parameter of replaceFirst is not a plain string, it can contain references to the matched pattern like "$0" so $ in val must be escaped. Does someone know why line 235 is commented out ? > When passing a parameter to Pig, if the value contains $ it has to be escaped > for no apparent reason > ---------------------------------------------------------------------------------------------------- > > Key: PIG-1827 > URL: https://issues.apache.org/jira/browse/PIG-1827 > Project: Pig > Issue Type: Bug > Components: impl > Affects Versions: 0.8.0 > Reporter: Julien Le Dem > Assignee: Richard Ding > Fix For: 0.9.0 > > Attachments: PIG-1827-1.patch, PIG-1827_2.patch > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira