You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "changxue (Jira)" <ji...@apache.org> on 2022/11/14 08:42:00 UTC

[jira] [Commented] (IOTDB-4927) [udf]should return at most 1 record when slidingTimeWindow displayWindowBegin=displayWindowEnd

    [ https://issues.apache.org/jira/browse/IOTDB-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17633600#comment-17633600 ] 

changxue commented on IOTDB-4927:
---------------------------------

long displayWindowBegin, long displayWindowEnd
这两个值,对于滑动窗口,真的有意义吗?

> [udf]should return at most 1 record when slidingTimeWindow displayWindowBegin=displayWindowEnd
> ----------------------------------------------------------------------------------------------
>
>                 Key: IOTDB-4927
>                 URL: https://issues.apache.org/jira/browse/IOTDB-4927
>             Project: Apache IoTDB
>          Issue Type: Bug
>    Affects Versions: 0.14.0-SNAPSHOT
>            Reporter: changxue
>            Assignee: Yuan Tian
>            Priority: Major
>         Attachments: TestSlidingTimeWindowAccessStrategy.java, image-2022-11-14-16-25-49-573.png, normla-udf-0.14-SNAPSHOT.jar, screenshot-1.png
>
>
> [udf]should return at most 1 record when slidingTimeWindow displayWindowBegin=displayWindowEnd
>  
> 我不知道,咱们窗口的start和end是闭区间还是半开半闭区间,如果是闭区间,应该至多返回仅一条,如果是左闭右开,那么就应该返回0条。
>  
> reproduction:
> {code:java}
> DROP DATABASE root.**;<<NULL;
> DROP FUNCTION SUM_SEC;<<NULL;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, 'start'=0,'end'=0) from root.udf.d1;{code}
> !image-2022-11-14-16-25-49-573.png!
>  !screenshot-1.png! 



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