Return-Path: Delivered-To: apmail-hadoop-pig-dev-archive@www.apache.org Received: (qmail 62585 invoked from network); 16 Dec 2009 23:51:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Dec 2009 23:51:41 -0000 Received: (qmail 39949 invoked by uid 500); 16 Dec 2009 23:51:40 -0000 Delivered-To: apmail-hadoop-pig-dev-archive@hadoop.apache.org Received: (qmail 39916 invoked by uid 500); 16 Dec 2009 23:51:40 -0000 Mailing-List: contact pig-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pig-dev@hadoop.apache.org Delivered-To: mailing list pig-dev@hadoop.apache.org Received: (qmail 39906 invoked by uid 99); 16 Dec 2009 23:51:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Dec 2009 23:51:40 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Dec 2009 23:51:38 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 57BAE234C4CF for ; Wed, 16 Dec 2009 15:51:18 -0800 (PST) Message-ID: <1167494909.1261007478358.JavaMail.jira@brutus> Date: Wed, 16 Dec 2009 23:51:18 +0000 (UTC) From: "Olga Natkovich (JIRA)" To: pig-dev@hadoop.apache.org Subject: [jira] Updated: (PIG-965) PERFORMANCE: optimize common case in matches (PORegex) In-Reply-To: <1455610202.1253210997979.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PIG-965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olga Natkovich updated PIG-965: ------------------------------- Resolution: Fixed Status: Resolved (was: Patch Available) patch committed. Thanks Ankit for contributing and Thejas for reviewing! > PERFORMANCE: optimize common case in matches (PORegex) > ------------------------------------------------------ > > Key: PIG-965 > URL: https://issues.apache.org/jira/browse/PIG-965 > Project: Pig > Issue Type: Improvement > Components: impl > Reporter: Thejas M Nair > Assignee: Ankit Modi > Attachments: automaton.jar, poregex2.patch > > > Some frequently seen use cases of 'matches' comparison operator have follow properties - > 1. The rhs is a constant string . eg "c1 matches 'abc%' " > 2. Regexes such that look for matching prefix , suffix etc are very common. eg - "abc%', "%abc", '%abc%' > To optimize for these common cases , PORegex.java can be changed to - > 1. Compile the pattern (rhs of matches) re-use it if the pattern string has not changed. > 2. Use string comparisons for simple common regexes (in 2 above). > The implementation of Hive like clause uses similar optimizations. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.