taosdata / TDengine

TDengine is an open source, high-performance, cloud native time-series database optimized for Internet of Things (IoT), Connected Cars, Industrial IoT and DevOps.

Home Page:https://tdengine.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When stream contains aggregate UDF, partition by is must-have

WangYMDKU opened this issue · comments

This code works fine:
create stream if not exists s11 fill_history 1 watermark 100s into xxx.st11 as select udf_agg_voltage(cells_v) as voltage_corr from xxx.product_property_s_1777158859875520514 where ts>='2024-05-08' partition by tbname count_window(20);

This code does not work:
create stream if not exists s11 fill_history 1 watermark 100s into xxx.st11 as select udf_agg_voltage(cells_v) as voltage_corr from xxx.product_property_s_1777158859875520514 where ts>='2024-05-08' count_window(20);

udf_agg_voltage is aggregate UDF.
product_property_s_1777158859875520514 is a supertable.
version: 3.2.3.0

In documentation, I didn't see any instruction like 'aggregate UDF in stream must work together with partition by'. If so, please add in documentation.

error code is ?

This code does not work:
create stream if not exists s11 fill_history 1 watermark 100s into xxx.st11 as select udf_agg_voltage(cells_v) as voltage_corr from xxx.product_property_s_1777158859875520514 where ts>='2024-05-08' count_window(20);