[
https://issues.apache.org/jira/browse/PHOENIX-4850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16849994#comment-16849994
]
Lars Hofhansl commented on PHOENIX-4850:
----------------------------------------
Is this a new issue only in 4.15, or an existing issue. If new it is a blocker
for 4.15.0, if old, I'll move it forward to 4.15.1.
[[email protected]] please let me know.
> Like predicate without wildcard doesn't pass the exact string if varchar
> columns has maxlength
> -----------------------------------------------------------------------------------------------
>
> Key: PHOENIX-4850
> URL: https://issues.apache.org/jira/browse/PHOENIX-4850
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Ankit Singhal
> Assignee: Ankit Singhal
> Priority: Major
> Fix For: 4.15.0
>
>
> [William
> |https://community.hortonworks.com/users/11882/williamprendergast.html]reported
> on
> [https://community.hortonworks.com/questions/210582/like-query-in-phoenix.html]
> that query is skipping all rows when length of the literal doesn't match
> with max lenght of the varchar column.
> Copied from above link:-
> When using a LIKE in a where clause, the rows are not found unless a
> wildcard(%) is added
> create table t ( ID VARCHAR(290) NOT NULL PRIMARY KEY, NAME VARCHAR(256));
> No rows affected (1.386 seconds) 0:
> jdbc:phoenix:> upsert into t values ('1','test');
> 1 row affected (0.046 seconds) 0:
> jdbc:phoenix:> select * from t;
> +-----+-------+
> | ID | NAME |
> +-----+-------+
> | 1 | test |
> +-----+-------+
> 1 row selected (0.05 seconds) 0:
> jdbc:phoenix:> select * from t where name like 'test';
> +-----+-------+
> | ID | NAME |
> +-----+-------+
> +-----+-------+
> No rows selected (0.016 seconds) 0:
> jdbc:phoenix:> select * from t where name like 'test%';
> +-----+-------+
> | ID | NAME |
> +-----+-------+
> | 1 | test |
> +-----+-------+
> 1 row selected (0.032 seconds)
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)