tags in table created by stream are lost or abnormal
@yu285 is already working on this.
Since Nov 29, 2024.
- 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,显示源表标签正常,流计算创建的表标签丢失或异常(标签字段对应错误)
下图流计算创建的表标签异常
标红的地方像是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)
新反馈:
如上图根据时间顺序创建的源表,流计算过程中使用的tag不是最后一条最新的,使用了第二张表的标签
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.