hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pi Song (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (PIG-123) cannot escape single quotes in single quoted strings when using the eq or match operator
Date Fri, 29 Feb 2008 02:46:51 GMT

    [ https://issues.apache.org/jira/browse/PIG-123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573572#action_12573572
] 

pi_song edited comment on PIG-123 at 2/28/08 6:46 PM:
------------------------------------------------------

Ben,

Pig is a processing-oriented system. You spend milliseconds to compile the query but spend
hours to do processing work. The real point to be optimized should be in the execution engine
where the code gets called over and over millions of time. This change in frontend encoding
should have extremely small impact on the whole execution.

In terms of performance analysis, this is an O ( n ) operation on a short in-memory string
(normally no longer than 1K) which gets called only once in an execution.

PS. If you do string scan first, it's still O ( n ) operation

      was (Author: pi_song):
    Ben,

Pig is a processing-oriented system. You spend milliseconds to compile the query but spend
hours to do processing work. The real point to be optimized should be in the execution engine
where the code gets called over and over millions of time. This change in frontend encoding
should have extremely small impact on the whole execution.

In terms of performance analysis, this is an O(n) operation on a short in-memory string (normally
no longer than 1K) which gets called only once in an execution.

PS. If you do string scan first, it's still O(n) operation
  
> 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-123_escape_char.patch, 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.


Mime
View raw message