Tao Yi created IOTDB-4407:
-----------------------------

             Summary: Where is null clause will not return the rows with all 
null which satisfied the where clause
                 Key: IOTDB-4407
                 URL: https://issues.apache.org/jira/browse/IOTDB-4407
             Project: Apache IoTDB
          Issue Type: Bug
    Affects Versions: 0.14.0-SNAPSHOT
         Environment: Windows 10
            Reporter: Tao Yi
         Attachments: image-2022-09-14-16-29-22-030.png, 
image-2022-09-14-16-29-32-716.png, image-2022-09-14-16-29-47-709.png

In 0.14.0 version, it seems that the where clause will return all rows 
satisfied the where condition, even though the returned result are all null.

This is the comparison of the same clause in 0.14.0-SNAPSHOT and 0.13.1.

!image-2022-09-14-16-29-22-030.png|width=997,height=612!

!image-2022-09-14-16-29-32-716.png|width=995,height=695!

However, when I try IS NULL and IS NOT NULL clause, they act different: IS NOT 
NULL clause will return all the rows satisfied, but IS NULL clause will not.

I execute the following query in IoTDB-client:

create timeseries root.sg1.d1.num with datatype=INT32, encoding=plain;

create timeseries root.sg1.d1.tem with datatype=INT32, encoding=plain;

create timeseries root.sg1.d1.tem2 with datatype=INT32, encoding=plain;

insert into root.sg1.d1(timestamp, num, tem, tem2) values(0, 2, 37, 1);

insert into root.sg1.d1(timestamp, num, tem, tem2) values(1, null, null, 1);

insert into root.sg1.d1(timestamp, num, tem, tem2) values(2, 1, null, 1);

insert into root.sg1.d1(timestamp, num, tem, tem2) values(3, null, 1, 1);

select * from root.sg1.d1;

select num from root.sg1.d1 where tem is not null;

select num from root.sg1.d1 where tem is null;

The result is in the following screenshot:

!image-2022-09-14-16-29-47-709.png|width=991,height=678!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to