TDengine
TDengine copied to clipboard
An exception is triggered when the NOT operator is used in combination with the equality comparison operator.
Bug Description
The combination of the NOT operator and binary comparison operators triggers an "Unexpected generic error".
To Reproduce
Assume that we execute the following statement under a database named testdb.
DROP TABLE IF EXISTS t1;
CREATE TABLE IF NOT EXISTS t1( time TIMESTAMP, c0 VARCHAR(100) );
INSERT INTO t1(time, c0) VALUES (1641024000000, "1");
INSERT INTO t1(time, c0) VALUES (1641024000001, "2");
# query success
SELECT time, c0 FROM t1 WHERE NOT (("1") <> (c0));
# query error
SELECT time, c0 FROM t1 WHERE NOT (("1") = (c0));
Expected Behavior
Both Query 1 and Query 2 are executed successfully, and both return one row of data.
Actual behaviour
Query 1 returns the expected result, while Query 2 fails to execute, returning the error: "Unexpected generic error".
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 bug?