超表 st
流计算的结果超表 sts
查询语句
SELECT t1._wend AS stime FROM (SELECT ts, c1 FROM st WHERE c1 = 'c1v' AND c2 = 'c2v' AND c3 = 'c3v' AND ts BETWEEN 1731031191000 AND 1731290391000) AS t LEFT JOIN sts AS t1 ON t.ts = t1._wend AND t1.c1 = t.c1 WHERE t1._wend IS NOT NULL;
报错信息
SQL 错误 [9985]: TDengine ERROR (0x2701): sql: ***, desc: primary timestamp equal condition is expected in join conditions
但是用开始时间去关联查询是没这个报错的
SELECT t1._wstart AS stime FROM (SELECT ts, c1 FROM st WHERE c1 = 'c1v' AND c2 = 'c2v' AND c3 = 'c3v' AND ts BETWEEN 1731031191000 AND 1731290391000) AS t LEFT JOIN sts AS t1 ON t.ts = t1._wstart AND t1.c1 = t.c1 WHERE t1._wstart IS NOT NULL;
超表 st 流计算的结果超表 sts 查询语句 SELECT t1.
_wend
AS stime FROM (SELECT ts, c1 FROM st WHERE c1 = 'c1v' AND c2 = 'c2v' AND c3 = 'c3v' AND ts BETWEEN 1731031191000 AND 1731290391000) AS t LEFT JOIN sts AS t1 ON t.ts = t1._wend
AND t1.c1 = t.c1 WHERE t1._wend
IS NOT NULL; 报错信息 SQL 错误 [9985]: TDengine ERROR (0x2701): sql: ***, desc: primary timestamp equal condition is expected in join conditions但是用开始时间去关联查询是没这个报错的 SELECT t1.
_wstart
AS stime FROM (SELECT ts, c1 FROM st WHERE c1 = 'c1v' AND c2 = 'c2v' AND c3 = 'c3v' AND ts BETWEEN 1731031191000 AND 1731290391000) AS t LEFT JOIN sts AS t1 ON t.ts = t1._wstart
AND t1.c1 = t.c1 WHERE t1._wstart
IS NOT NULL;请问是什么原因造成的,如果想用结束时间去关联查询的话有其他的方式吗?