phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Swaroopa Kadam (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-5173) LIKE and ILIKE statements return empty result list for search without wildcard
Date Wed, 17 Apr 2019 17:38:00 GMT

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

Swaroopa Kadam commented on PHOENIX-5173:
-----------------------------------------

org.apache.phoenix.compile.WhereOptimizerTest is mutually exclusive of the test I added in
this patch. org.apache.phoenix.compile.WhereOptimizerTest expects when rhs of like is a literal,
it does not return any rows. I believe with this change, we don't need to keep org.apache.phoenix.compile.WhereOptimizerTest
around, as we now support not specifying a wildcard in the like expression. What do you say,
[~tdsilva] [~ckulkarni] [~karanmehta93]

> LIKE and ILIKE statements return empty result list for search without wildcard
> ------------------------------------------------------------------------------
>
>                 Key: PHOENIX-5173
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5173
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.7.0
>            Reporter: Emiliia Nesterovych
>            Assignee: Swaroopa Kadam
>            Priority: Blocker
>         Attachments: PHOENIX-5173.4.x-HBase-1.3.v1.patch
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> I expect these two statements to return same result, as MySql does:
> {code:java}
> SELECT * FROM my_schema.user WHERE USER_NAME = 'Some Name';
> {code}
> {code:java}
> SELECT * FROM my_schema.user WHERE USER_NAME LIKE 'Some Name';
> {code}
> But while there is data for these scripts, the statement with "LIKE" operator returns
empty result set. Same affects "ILIKE" operator. 
>  Create table SQL is:
> {code:java}
> CREATE SCHEMA IF NOT EXISTS my_schema;
> CREATE TABLE my_schema.user (USER_NAME VARCHAR(255), ID BIGINT NOT NULL PRIMARY KEY);{code}
> Fill up query:
> {code:java}
> UPSERT INTO my_schema.user VALUES('Some Name', 1);{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message