[
https://issues.apache.org/jira/browse/PIG-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julien Le Dem resolved PIG-2074.
--------------------------------
Resolution: Duplicate
> When passing a parameter to Pig, if the value contains $ it has to be escaped
> because of a bug in PrecprocessorContext
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: PIG-2074
> URL: https://issues.apache.org/jira/browse/PIG-2074
> Project: Pig
> Issue Type: Bug
> Components: impl
> Reporter: Julien Le Dem
> Priority: Minor
>
> This was raised while looking at PIG-1827
> There seems to be a bug in PreprocessorContext:
> http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/tools/parameters/PreprocessorContext.java?view=markup
> {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 ?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira