The execution results of the NOT operator are inconsistent between DOUBLE type data and INTEGER UNSIGNED type data.
Bug Description
When querying DOUBLE type data, an error occurs when applying the NOT operator in the WHERE clause: "DB error: Unexpected generic error (0.000660s)", while the same query statement can be successfully executed with BIGINT UNSIGNED type data.
To Reproduce
Assume that we execute the following statement under a database named testdb.
# statement 1
DROP TABLE IF EXISTS t1;
CREATE TABLE t1( time TIMESTAMP, c1 DOUBLE);
INSERT INTO t1(time, c1) VALUES (1641024000000, NULL);
SELECT time, c1 FROM t1 WHERE NOT (1 > c1);
# statement 2
DROP TABLE IF EXISTS t1;
CREATE TABLE t1( time TIMESTAMP, c1 BIGINT UNSIGNED);
INSERT INTO t1(time, c1) VALUES (1641024000000, NULL);
SELECT time, c1 FROM t1 WHERE NOT (1 > c1);
Expected Behavior
The execution results of Statement 1 and Statement 2 are consistent, both retrieving all the data.
Actual behaviour
In Statement 1, the query returns an error: "DB error: Unexpected generic error (0.000660s)", while in Statement 2, all data is retrieved correctly.
Environment
- OS:Ubuntu Server 22.04 LTS 64bit
- TDengine Version:3.3.3.0
Additional Context
Hello, TDengine team. I'd like to confirm with you whether this is a logical bug?
thanks for feedback ,we will check on this
can you check this in the newest version 3.3.4.3 to verify these two query?
we have fixed it
Thanks for fixing this! Good Job!