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
Loss of Precision in Arithmetic Operations on BIGINT Data Type.
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, 9000000000000000000);
# query 1
SELECT c1 FROM t1 WHERE 9000000000000000001 <= c1;
# query 2
SELECT c1 FROM t1 WHERE 9000000000000000001 <= c1 + CAST(0 as BIGINT);
Expected Behavior
Query 1 returned result set: empty set
Query 2 returned result set: empty set
Actual behaviour
Query 1 returned result set: empty set
Query 2 returned result set: 9000000000000000000
Environment
OS:Ubuntu Server 22.04 LTS 64bit
TDengine Version:3.3.4.3
Additional Context
Hello, TDengine team. I found that arithmetic operations on the BIGINT type fail to meet the precision requirement of 2^63-1 supported by the BIGINT type, which might be a logical error.
The text was updated successfully, but these errors were encountered:
Bug Description
Loss of Precision in Arithmetic Operations on BIGINT Data Type.
To Reproduce
Assume that we execute the following statement under a database named testdb.
Expected Behavior
Query 1 returned result set: empty set
Query 2 returned result set: empty set
Actual behaviour
Query 1 returned result set: empty set
Query 2 returned result set: 9000000000000000000
Environment
Additional Context
Hello, TDengine team. I found that arithmetic operations on the BIGINT type fail to meet the precision requirement of 2^63-1 supported by the BIGINT type, which might be a logical error.
The text was updated successfully, but these errors were encountered: