【TDengine 使用环境】
生产环境 /测试/ Poc/预生产环境
【TDengine 版本】
3.3.8.1
【操作系统以及版本】
centos7
【部署方式】容器/非容器部署
容器单机
【集群节点数】
【集群副本数】
【描述业务影响】
create stream if not exists lute_iot_device.t31_daily_stats_stream_min_max_avg interval(1d) sliding (1d)
from
lute_iot_device.product_property_3yhuya partition by tbname stream_options (watermark (5 m) | fill_history (1))
into
lute_iot_device.t31_daily_stats output_subtable (concat('t31_daily\_', **lower**(tbname))) ( ts,
uid composite **key**,
calculate_time,
window_end,
avg_temperature,
max_temperature,
min_temperature ) tags ( device_name **varchar**(64) **as** replace (tbname,
'device_property\_',
'') ) **as**
select
\_twstart **as** ts,
uid **as** uid,
**cast**(\_tlocaltime / 1000000 **as** **timestamp**) **as** calculate_time,
\_twend **as** window_end,
round(**avg**(temperature), 2) **as** avg_temperature,
**max**( **case** **when** identifier = 'high_temperature_alarm' **then** temperature **else** **null** **end** ) **as** max_temperature,
**min**( **case** **when** identifier = 'low_temperature_alarm' **then** temperature **else** **null** **end** ) **as** min_temperature
from
%%tbname
where
TO_ISO8601(ts,time_offset) >= \_twstart
**and** TO_ISO8601(ts,time_offset) <= \_twend **partition** **by** device_name,
uid;
这个是我的流计算,time_offset是我的时区字段,请问一下如果我需要时区转换可以用TO_ISO8601函数转换后去和窗口的开始时间和结束时间比较吗
【问题复现路径/shan】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】
【资源配置】
【报错完整截图】(不要大段的粘贴报错代码,论坛直接看报错代码不直观)



