[
https://issues.apache.org/jira/browse/PHOENIX-3051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kevin Liew reopened PHOENIX-3051:
---------------------------------
> IN predicate cannot compare CHAR columns of differing length
> ------------------------------------------------------------
>
> Key: PHOENIX-3051
> URL: https://issues.apache.org/jira/browse/PHOENIX-3051
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.7.0
> Reporter: Kevin Liew
> Priority: Minor
> Labels: char, in, sql
>
> {code}
> create table testchar1 (pk char(10) primary key)
> create table testchar2 (pk char(20) primary key)
> upsert into testchar1 values('a')
> upsert into testchar2 values('a')
> upsert into testchar1 values('b')
> upsert into testchar2 values('b')
> select testchar1.pk from testchar1 where testchar1.pk not in (select
> testchar2.pk from testchar2)
> {code}
> `testchar1` and `testchar2` contain the same data so the result of the select
> query should return an empty result set. Instead, all of the rows of
> `testchar1` are returned.
> Note that the following queries will return an empty result set as expected:
> {code}
> select testchar1.pk from testchar1 where testchar1.pk not in ('a', 'b')
> select testchar1.pk from testchar1 where testchar1.pk not in ('a ', 'b ')
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)