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
The abstract expression sequence is: SELECT DISTINCT CSUM(column), time FROM table ORDER BY time;
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 INT);
INSERT INTO t1(time, c1) VALUES (1641024000000, 1), (1641024005000, 2);
# query 1
SELECT DISTINCT CSUM(c1), time FROM t1 ORDER BY time;
SELECT DISTINCT CSUM(c1), time AS ref FROM t1 ORDER BY ref;
# query 2
SELECT DISTINCT CSUM(c1), time FROM t1;
Expected Behavior
Expected result set for Query 1: 1 and 3
Expected result set for Query 2: 1 and 3
Actual behaviour
Query 1 returned result set: DB error: Planner internal error
Hello, TDengine team. When I combine time series-specific functions with DISTINCT and sort the data by the time field, the TDengine planner returns an internal error. This may be a potential crash error in the planner. Not only the CSUM function triggers this error, but other time series-specific functions also cause this error.
The text was updated successfully, but these errors were encountered:
Bug Description
The abstract expression sequence is:
SELECT DISTINCT CSUM(column), time FROM table ORDER BY time;
To Reproduce
Assume that we execute the following statement under a database named testdb.
Expected Behavior
Expected result set for Query 1: 1 and 3
Expected result set for Query 2: 1 and 3
Actual behaviour
Query 1 returned result set: DB error: Planner internal error
Query 2 returned result set: 1 and 3
Environment
Additional Context
Hello, TDengine team. When I combine time series-specific functions with DISTINCT and sort the data by the time field, the TDengine planner returns an internal error. This may be a potential crash error in the planner. Not only the CSUM function triggers this error, but other time series-specific functions also cause this error.
The text was updated successfully, but these errors were encountered: