You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "ChenFangRong (JIRA)" <ji...@apache.org> on 2016/01/21 04:39:39 UTC

[jira] [Updated] (PHOENIX-2617) query result not correct when pk is constraint and inlist condition in second position.

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

ChenFangRong updated PHOENIX-2617:
----------------------------------
    Description: 
create Table sql,
CREATE TABLE bugTable ( name varchar, address varchar,company varchar, interest varchar CONSTRAINT pk PRIMARY KEY (name,address,company) );

upsert the value,the table and its value is now as below:
upsert value sql,

upsert into bugTable values ('A1','B1','C1','D1');
upsert into bugTable (name,company,interest) values ('A2','C2','D2');
upsert into bugTable values ('A3','B3','C3','D3');

name address company interest
A1       B1           C1           D1
A2       null          C2           D2
A3       B3           C3           D3

if you use the sql to query:

select * from bugTable where address in('B1','B3') and interest='D2';

the query result is :

name  address  company  interest
A2        null         C2                D2

the result is supposed to be null.
but the fact is it has a result,phoenix does not filter the column where the value of address is null.

  was:
create Table sql,
CREATE TABLE bugTable ( name varchar, address varchar,company varchar, interest varchar CONSTRAINT pk PRIMARY KEY (name,address,company) );

upsert the value,the table and its value is now as below:
upsert vaule sql,

upsert into bugTable values ('A1','B1','C1','D1');
upsert into bugTable (name,company,interest) values ('A2','C2','D2');
upsert into bugTable values ('A3','B3','C3','D3');

name address company interest
A1       B1           C1           D1
A2       null          C2           D2
A3       B3           C3           D3

if you use the sql to query:

select * from bugTable where address in('B1','B3') and interest='D2';

the query result is :

name  address  company  interest
A2        null         C2                D2

the result is supposed to be null.
but the fact is it has a result,phoenix does not filter the column where the value of address is null.


> query result not correct when pk is constraint and inlist condition in second position.
> ---------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2617
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2617
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>         Environment: CentOS
>            Reporter: ChenFangRong
>              Labels: easyfix
>
> create Table sql,
> CREATE TABLE bugTable ( name varchar, address varchar,company varchar, interest varchar CONSTRAINT pk PRIMARY KEY (name,address,company) );
> upsert the value,the table and its value is now as below:
> upsert value sql,
> upsert into bugTable values ('A1','B1','C1','D1');
> upsert into bugTable (name,company,interest) values ('A2','C2','D2');
> upsert into bugTable values ('A3','B3','C3','D3');
> name address company interest
> A1       B1           C1           D1
> A2       null          C2           D2
> A3       B3           C3           D3
> if you use the sql to query:
> select * from bugTable where address in('B1','B3') and interest='D2';
> the query result is :
> name  address  company  interest
> A2        null         C2                D2
> the result is supposed to be null.
> but the fact is it has a result,phoenix does not filter the column where the value of address is null.



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