[jira] [Commented] (PIG-1827) When passing a parameter to Pig, if the value contains $ it has to be escaped for no apparent reason

2011-05-13 Thread Daniel Dai (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13032870#comment-13032870
 ] 

Daniel Dai commented on PIG-1827:
-

+1

 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, PIG-1827_3.patch




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIG-1827) When passing a parameter to Pig, if the value contains $ it has to be escaped for no apparent reason

2011-05-13 Thread Julien Le Dem (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13033285#comment-13033285
 ] 

Julien Le Dem commented on PIG-1827:


I created PIG-2074 to discuss the PreprocessorContext

 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, PIG-1827_3.patch




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIG-1827) When passing a parameter to Pig, if the value contains $ it has to be escaped for no apparent reason

2011-05-09 Thread Julien Le Dem (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13030838#comment-13030838
 ] 

Julien Le Dem commented on PIG-1827:


right.
Please add a unit test to verify that fixNonEscapedDollarSign returns what we 
expect.


 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


[jira] [Commented] (PIG-1827) When passing a parameter to Pig, if the value contains $ it has to be escaped for no apparent reason

2011-05-09 Thread Julien Le Dem (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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


[jira] [Commented] (PIG-1827) When passing a parameter to Pig, if the value contains $ it has to be escaped for no apparent reason

2011-05-09 Thread Richard Ding (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13030972#comment-13030972
 ] 

Richard Ding commented on PIG-1827:
---

New patch added a unit test case as suggested.

 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, PIG-1827_3.patch




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIG-1827) When passing a parameter to Pig, if the value contains $ it has to be escaped for no apparent reason

2011-04-25 Thread Richard Ding (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13024833#comment-13024833
 ] 

Richard Ding commented on PIG-1827:
---

Unit tests pass.

 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




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIG-1827) When passing a parameter to Pig, if the value contains $ it has to be escaped for no apparent reason

2011-04-25 Thread Julien Le Dem (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13024970#comment-13024970
 ] 

Julien Le Dem commented on PIG-1827:


Hi Richard,
thanks for taking care of this.

* in test/org/apache/pig/test/TestScriptLanguage.java
the test should verify that the value are properly passed to the script
{code}
testvar = 'abcd$py',
testvar2 = '$',
testvar3 = '$',
testvar4 = 'abcd\\$py$',
testvar5 = 'abcd\\$py',
{code}
what about this?
{code}
P = Pig.compile(\\\a = load '$input'; b = foreach a generate 
$0,$1,$testvar,$testvar2,$testvar3,$testvar4,$testvar5; store b into 
'$output';\\\), 
{code}
then you can check that you get the values in the output.

we should check that the transformation is bijective.


 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




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIG-1827) When passing a parameter to Pig, if the value contains $ it has to be escaped for no apparent reason

2011-04-21 Thread Richard Ding (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13023034#comment-13023034
 ] 

Richard Ding commented on PIG-1827:
---

Looked into it a little more. Actually, embedded Pig just use parameter 
substitution to perform parameter binding and it doesn't support recursive 
substitution. So it should be ok to remove the requirement that $ in parameter 
be escaped.

 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




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira