phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ankit Singhal (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (PHOENIX-4850) Like predicate without wildcard doesn't pass the exact string if varchar columns has maxlength
Date Tue, 28 May 2019 18:26:00 GMT

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

Ankit Singhal reassigned PHOENIX-4850:
--------------------------------------

    Assignee:     (was: Ankit Singhal)

> 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
>            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)

Mime
View raw message