taosdata / TDengine

High-performance, scalable time-series database designed for Industrial IoT (IIoT) scenarios
https://tdengine.com
GNU Affero General Public License v3.0
23.42k stars 4.87k forks source link

超表与流计算的结果超表关联查询后的错误码2701 #28718

Open sl2026 opened 2 weeks ago

sl2026 commented 2 weeks ago

超表 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;

请问是什么原因造成的,如果想用结束时间去关联查询的话有其他的方式吗?

yu285 commented 6 days ago

请问版本号是?