taosdata / TDengine

High-performance, scalable time-series database designed for Industrial IoT (IIoT) scenarios
https://tdengine.com
GNU Affero General Public License v3.0
23.36k stars 4.85k forks source link

The combination of the NOT (NOT) operation triggers a logical bug. #28335

Open LingweiKuang opened 2 weeks ago

LingweiKuang commented 2 weeks ago

Bug Description

The combination of the NOT (NOT) operation triggers a logical bug.

To Reproduce

Assume that we execute the following statement under a database named testdb.

DROP TABLE IF EXISTS t1;

CREATE TABLE t1( time TIMESTAMP, c0 BIGINT);
INSERT INTO t1(time, c0) VALUES (1641024000000, 1);

# query statement
SELECT time, c0 FROM t1 WHERE NOT (NOT (1 == 1));

Expected Behavior

The above query statement should be able to retrieve all the data.

Actual behaviour

The above query did not return any data and did not report any errors.

Environment

Additional Context

Hello, TDengine team. I'd like to confirm with you whether this is a logical bug?

yu285 commented 3 days ago

let me check on this .