The TDengine interval(1n) query returned one more result than expected. TDengine version 3.0
Executed SQL
SELECT
_wstart,
_wend,
LAST ( point_value ) - FIRST ( point_value ) AS point_value
FROM
configuration.p413611955640541184
WHERE
ts >= "2023-07-01 00:00:00" and ts <="2023-08-03 13:57:31" interval(1n) FILL(PREV)
Expected results
_wstart | _wend | point_value |
================================================================================
2023-07-01 00:00:00.000 | 2023-08-01 00:00:00.000 | 1503.300000000 |
2023-08-01 00:00:00.000 | 2023-09-01 00:00:00.000 | 1503.300000000 |
Actual results
_wstart | _wend | point_value |
================================================================================
2023-06-01 00:00:00.000 | 2023-07-01 00:00:00.000 | NULL |
2023-07-01 00:00:00.000 | 2023-08-01 00:00:00.000 | 1503.300000000 |
2023-08-01 00:00:00.000 | 2023-09-01 00:00:00.000 | 1503.300000000 |
The actual results exceeded the expected results, as recorded in June But changing the query time to June to July will not have any extra records
Does this seem to be related to the long month and short month? Is this a bug?
interval(1n,8h) Executed SQL
SELECT _wstart, _wend, LAST ( point_value ) - FIRST ( point_value ) AS point_value FROM configuration.p413611955640541184 WHERE ts >= "2023-06-01 00
:00:00" and ts <="2023-08-03 13:57:31" interval(1n,8h) FILL(PREV);
Actual results
_wstart | _wend | point_value |
================================================================================
2023-05-01 08:00:00.000 | 2023-06-01 08:00:00.000 | 190.800000000 |
2023-06-01 08:00:00.000 | 2023-07-01 08:00:00.000 | 17211.700000000 |
2023-07-01 08:00:00.000 | 2023-08-01 08:00:00.000 | 1359.500000000 |
2023-08-01 08:00:00.000 | 2023-09-01 08:00:00.000 | 1359.500000000 |