You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Pi Song (JIRA)" <ji...@apache.org> on 2008/02/27 15:53:51 UTC

[jira] Updated: (PIG-123) cannot escape single quotes in single quoted strings when using the eq or match operator

     [ https://issues.apache.org/jira/browse/PIG-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pi Song updated PIG-123:
------------------------

    Attachment: pig_escape_patch1.patch

This patch adds escape character to pig script and grunt.

{noformat}
-  "\'","\r","\f","\t","\n","\b" are supported
- "\\" will be interpreted to \
- "\uxxxx" for unicode are supported
- "\x" where x doesn't match anything above will be interpreted to x (skipping "\" )
{noformat}

This patch is only for review. Unit test is coming after I sort out the my miniMR problem.

> cannot escape single quotes in single quoted strings when using the eq or match operator
> ----------------------------------------------------------------------------------------
>
>                 Key: PIG-123
>                 URL: https://issues.apache.org/jira/browse/PIG-123
>             Project: Pig
>          Issue Type: Bug
>            Reporter: andrei badulescu
>         Attachments: pig_escape_patch1.patch
>
>
> a query like this :
> filter c by ( c.string eq 'hell\'s angels' OR c.string eq 'blue\'s clues')  
> generates an error with the pig parser, because the parser does not allow single quotes (') within single quotes, even if they are escaped with a backslash. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.