Andrew Sherman created IMPALA-10849:
---------------------------------------

             Summary: A LIKE predicate that ends in an escaped wildcard is 
incorrectly evaluated
                 Key: IMPALA-10849
                 URL: https://issues.apache.org/jira/browse/IMPALA-10849
             Project: IMPALA
          Issue Type: Bug
          Components: Backend
            Reporter: Andrew Sherman
            Assignee: Andrew Sherman


If the last character of a LIKE predicate is an escaped wildcard (e.g. LIKE 
foo\%) then it is incorrectly evaluated. This is because the fast path 
optimizations in LikePrepareInternal treat the predicate as being a search for 
a string with a fixed prefix. If the fast path optimizations are commented out 
then the LIKE is evaluated correctly.

A possible fix would be to make the fast path optimizations recognize that 
escaped wildcards cannot be evaluated by the fixed prefix search.

This is a simpler bug than that discussed in IMPALA-2422 which is to do with 
ambiguities in the logic of unescaping string literals (which is more tricky to 
fix).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to