You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a logical error when applying constraints that combine comparison operators and OR expressions on the Time field. The abstract expression sequence is: (time < CONSTANT) OR (TRUE)
To Reproduce
Assume that we execute the following statement under a database named testdb.
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(time TIMESTAMP, c1 BIGINT);
INSERT INTO t1(time, c1) VALUES (1641024000000, 1);
# query 1
SELECT c1 FROM t1 WHERE time <= 1641024000001;
# query 2
SELECT c1 FROM t1 WHERE (time <= 1641024000001) OR (1 < 2);
Expected Behavior
Query 1 returned result set: 1
Query 2 returned result set: 1
Actual behaviour
Query 1 returned result set: 1
Query 2 returned result set: empty set
Environment
OS:Ubuntu Server 22.04 LTS 64bit
TDengine Version:3.3.4.3
Additional Context
Hello, TDengine team. In Query 1, using comparison operators to constrain the Time field successfully retrieves data. However, in Query 2, after adding the OR operator in combination, a logical error occurs, and the query returns no results.
The text was updated successfully, but these errors were encountered:
Bug Description
There is a logical error when applying constraints that combine comparison operators and OR expressions on the Time field. The abstract expression sequence is:
(time < CONSTANT) OR (TRUE)
To Reproduce
Assume that we execute the following statement under a database named testdb.
Expected Behavior
Query 1 returned result set: 1
Query 2 returned result set: 1
Actual behaviour
Query 1 returned result set: 1
Query 2 returned result set: empty set
Environment
Additional Context
Hello, TDengine team. In Query 1, using comparison operators to constrain the Time field successfully retrieves data. However, in Query 2, after adding the OR operator in combination, a logical error occurs, and the query returns no results.
The text was updated successfully, but these errors were encountered: