[ 
https://issues.apache.org/jira/browse/IOTDB-4929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuan Tian reassigned IOTDB-4929:
--------------------------------

    Assignee: liaolanyu  (was: Yuan Tian)

> [UDF] the sliding time window stopped when the keys in PointCollector are not 
> unique
> ------------------------------------------------------------------------------------
>
>                 Key: IOTDB-4929
>                 URL: https://issues.apache.org/jira/browse/IOTDB-4929
>             Project: Apache IoTDB
>          Issue Type: Bug
>    Affects Versions: 0.14.0-SNAPSHOT
>            Reporter: changxue
>            Assignee: liaolanyu
>            Priority: Major
>         Attachments: image-2022-11-14-17-53-31-312.png, 
> image-2022-11-14-17-54-27-906.png
>
>
> the sliding time window stopped when the keys in PointCollector are not 
> unique, I guess  it ignores the exceptions of the source codes in transform 
> method.
> reproduction:
> {code:java}
> create function sum_sec as 
> "com.timecho.udf.normal.TestSlidingTimeWindowAccessStrategy";CREATE 
> TIMESERIES root.udf.d1.s1 WITH DATATYPE=int64, ENCODING=PLAIN;
> CREATE TIMESERIES root.udf.d1.s2 WITH DATATYPE=int64, ENCODING=PLAIN;
> CREATE TIMESERIES root.udf.d1.s3 WITH DATATYPE=int32, ENCODING=PLAIN;
> CREATE TIMESERIES root.udf.d1.ss1 WITH DATATYPE=int64, ENCODING=PLAIN;
>  
> insert into root.udf.d1 (time, s1, s2) values (1, 1, 2),(2, 3, 4),(3, null, 
> 6),(4, 7, 8),(5, 9, 10),(6, 11, null),(7, 13, 14),(8, 15, 16),(12, 17, 
> 18),(20, 19, 20);
> -- notice this
> select sum_sec(s1,'interval'=3,'step'=1) from root.udf.d1; {code}
>  
> !image-2022-11-14-17-53-31-312.png!
>  !image-2022-11-14-17-54-27-906.png! 
> see the screen shot upstairs:
> 因为时间为3的值是null, 所以,在滑动到第三行时,它取的时间列是第四行,而下一次滑动,它真正滑动到第四个值时,它的时间列还是4, 冲突了。
> 问题:
> 1. 该抛异常就应该抛出来,不然静默处理,调试时,都不知道发生了什么
> 2. PointCollector 如果要求timestamp唯一,那么得给出一个contains或者hasKey方法,不然很容易出现撞车。
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to