You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "jean-claude (JIRA)" <ji...@apache.org> on 2016/05/10 10:48:12 UTC

[jira] [Created] (DRILL-4661) Optimze the LIKE function

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)