TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

The execution results of the NOT operator are inconsistent between DOUBLE type data and INTEGER UNSIGNED type data.

Open LingweiKuang opened this issue 1 year ago • 1 comments

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?

LingweiKuang avatar Oct 12 '24 03:10 LingweiKuang

thanks for feedback ,we will check on this

yu285 avatar Oct 15 '24 03:10 yu285

can you check this in the newest version 3.3.4.3 to verify these two query?

we have fixed it

image

yu285 avatar Nov 21 '24 09:11 yu285

Thanks for fixing this! Good Job!

LingweiKuang avatar Dec 12 '24 02:12 LingweiKuang