[ 
https://issues.apache.org/jira/browse/PHOENIX-3046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15479742#comment-15479742
 ] 

Julian Hyde commented on PHOENIX-3046:
--------------------------------------

According to the standard, {{LIKE}} and {{NOT LIKE}} will return {{UNKNOWN}} 
(aka boolean NULL) when applied to a null value. Pretty much all of SQL's 
standard operators use 3-value logic.

This means that {{c NOT LIKE pattern}} is always the same as {{NOT (c LIKE 
pattern)}}, which is good.

> `NOT LIKE '%'` unexpectedly returns results
> -------------------------------------------
>
>                 Key: PHOENIX-3046
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3046
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.7.0
>            Reporter: Kevin Liew
>            Assignee: Kevin Liew
>            Priority: Minor
>              Labels: like, like-predicate, phoenix, regex, wildcard, wildcards
>             Fix For: 4.9.0, 4.8.1
>
>
> The following returns all rows in the table when it should return no rows:
> {code}select * from emp where first_name not like '%'{code}
> The following returns no rows as expected:
> {code}select * from emp where first_name not like '%%'{code}
> first_name is a VARCHAR column



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

Reply via email to