drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jean-claude (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-4661) Optimze the LIKE function
Date Tue, 10 May 2016 10:48:12 GMT
jean-claude created DRILL-4661:
----------------------------------

             Summary: Optimze the LIKE function
                 Key: DRILL-4661
                 URL: https://issues.apache.org/jira/browse/DRILL-4661
             Project: Apache Drill
          Issue Type: Improvement
            Reporter: jean-claude
            Priority: Minor


The LIKE function is implemented using the java regex. This is different from the STRPOS function
which compares byte by byte.

When doing to testing I've noticed that for cases where the user wants to do a restriction
like WHERE COL1 LIKE '%xyz%' it would be faster to actually do WHERE STRPOS(COL1, '%xyz%')
> 0

I propose to change the LIKE operator's algorithm so that it detects if a byte by byte compare
could be applied and if so use the same technique as the STRPOS function. Cases of the form
'%xyz%', 'xyz%' and '%xyz' could be handled this way.





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message