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

yang caiyin reassigned IOTDB-5747:
----------------------------------

    Assignee: yang caiyin

> UDF SlidingTimeWindow slidingStep bug
> -------------------------------------
>
>                 Key: IOTDB-5747
>                 URL: https://issues.apache.org/jira/browse/IOTDB-5747
>             Project: Apache IoTDB
>          Issue Type: Bug
>            Reporter: Lei Rui
>            Assignee: yang caiyin
>            Priority: Major
>
> To reproduce the bug in IoTDB v1.0.1:
> ```
> insert into root.sg1.d1(timestamp,s1) values(1,1)
> insert into root.sg1.d1(timestamp,s1) values(2,2)
> insert into root.sg1.d1(timestamp,s1) values(3,3)
> insert into root.sg1.d1(timestamp,s1) values(4,4)
> insert into root.sg1.d1(timestamp,s1) values(5,5)
> insert into root.sg1.d1(timestamp,s1) values(6,6)
> insert into root.sg1.d1(timestamp,s1) values(7,7)
> insert into root.sg1.d1(timestamp,s1) values(8,8)
> select M4(s1,'timeInterval'='3','slidingStep'='2') from root.sg1.d1
> ```
> The query result is:
> ```
> +-----------------------------+---------------------------------------------------------+
> |                         Time|M4(root.sg1.d1.s1, "timeInterval"="3", 
> "slidingStep"="2")|
> +-----------------------------+---------------------------------------------------------+
> |1970-01-01T08:00:00.001+08:00|                                               
>        1.0|
> |1970-01-01T08:00:00.003+08:00|                                               
>        3.0|
> +-----------------------------+---------------------------------------------------------+
> Total line number = 2
> ```
> which is wrong, as the sliding time windows and the M4 samples of each window 
> should be:
> - [1,4): samples (1,1),(3,3)
> - [3,6): samples (3,3),(5,5)
> - [5,8): samples (5,5), (7,7)
> - [7,10): samples (7,7), (8,8)
> From my observation, the bug tends to happen when the slidingStep equals 
> timeInterval-1. I think there are bugs in the sliding time window code, but I 
> couldn't locate the bug because I am not familiar with the UDF module.
> By the way, IoTDB version is:
> ```
> IoTDB> show version
> +-------+-----------+
> |Version|  BuildInfo|
> +-------+-----------+
> |  1.0.1|88c9bef-dev|
> +-------+-----------+
> ```
> I used the released apache-iotdb-1.0.1-all-bin zip.



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

Reply via email to