taosdata / taosdata/TDengine

tags in table created by stream are lost or abnormal

Open
#28,796 2 comments 0 reactions 1 assignee View on GitHub

@yu285 is already working on this.

Since Nov 29, 2024.

bug
Dominant language
C
Stars
25.1k
Forks
5k
Avg merge
4d 59m
Merged PRs (30d)
7

Description

version:3.3.4.3 Community docker环境
SHOW TABLE TAGS,显示源表标签正常,流计算创建的表标签丢失或异常(标签字段对应错误)
image
下图流计算创建的表标签异常
image
标红的地方像是tag 写入对应错误了,这个里面client_id 标签丢失,child_id 标签异常,user_id 标签值是child_id的
流计算语句:
create stream cc_test_sock_minute into cc_test.device_sock_minute(record_time,spo2_avg,spo2_max,spo2_min,heartrate_avg,heartrate_max,heartrate_min,activity,device_id,heartrate_diff,wear) tags(client_id,child_id,user_id) subtable(concat('device_sock_minute_', lower(client_id))) as select _wstart , avg(case when spo2=0 then null else spo2 end) spo2_avg,max(case when spo2=0 then null else spo2 end) spo2_max,min(case when spo2=0 then null else spo2 end) spo2_min,avg(case when heartrate=0 then null else heartrate end) heartrate_avg,max(case when heartrate=0 then null else heartrate end) heartrate_max,min(case when heartrate=0 then null else heartrate end) heartrate_min,max(case when activity>1 then activity when spo2>0 or heartrate>0 then 1 else 0 end ) activity,last(device_id),spread(heartrate) heartrate_diff,max(wear) wear from cc_test.device_sock partition by client_id,child_id,user_id interval(1m)

新反馈:
image
如上图根据时间顺序创建的源表,流计算过程中使用的tag不是最后一条最新的,使用了第二张表的标签

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.