You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "N Campbell (JIRA)" <ji...@apache.org> on 2017/01/25 01:50:26 UTC

[jira] [Created] (PHOENIX-3627) equi-join predicate should not return a row where null values are compared

N Campbell created PHOENIX-3627:
-----------------------------------

             Summary: equi-join predicate should not return a row where null values are compared
                 Key: PHOENIX-3627
                 URL: https://issues.apache.org/jira/browse/PHOENIX-3627
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.7.0
         Environment: Hortonworks 2.5.3
            Reporter: N Campbell


Following query should not return a row where NULL values are compared with an equality predicate.


select TINT.RNUM, TSINT.RNUM, TINT.CINT , TSINT.CSINT from TINT , TSINT where TINT.CINT = TSINT.CSINT

TINT.RNUM	TSINT.RNUM	TINT.CINT	TSINT.CSINT
0	0	<null>	<null>
1	1	-1	-1
2	2	0	0
3	3	1	1
4	4	10	10

create table  if not exists TSINT ( RNUM integer  not null primary key , CSINT smallint   );

create table  if not exists TINT ( RNUM integer  not null primary key , CINT integer   );

upsert into TSINT(RNUM, CSINT) values ( 0, NULL);
upsert into TSINT(RNUM, CSINT) values ( 1, -1);
upsert into TSINT(RNUM, CSINT) values ( 2, 0);
upsert into TSINT(RNUM, CSINT) values ( 3, 1);
upsert into TSINT(RNUM, CSINT) values ( 4, 10);
upsert into TINT(RNUM, CINT) values ( 0, NULL);
upsert into TINT(RNUM, CINT) values ( 1, -1);
upsert into TINT(RNUM, CINT) values ( 2, 0);
upsert into TINT(RNUM, CINT) values ( 3, 1);
upsert into TINT(RNUM, CINT) values ( 4, 10);





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