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

jean-claude updated DRILL-4661:
-------------------------------
    Fix Version/s: 1.7.0

> 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
>             Fix For: 1.7.0
>
>
> 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)

Reply via email to