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

[jira] [Created] (IOTDB-2597) UDF: NON_ZERO_DURATION

Steve Yurong Su created IOTDB-2597:
--------------------------------------

             Summary: UDF: NON_ZERO_DURATION
                 Key: IOTDB-2597
                 URL: https://issues.apache.org/jira/browse/IOTDB-2597
             Project: Apache IoTDB
          Issue Type: Wish
            Reporter: Steve Yurong Su


input: a time series (type: INT32, INT64, FLOAT or DOUBLE, BOOLEAN)

output: a time series (type: INT64)

parameter:

  min_duration: INT64

  max_duration: INT64

  min_duration <= max_duration

description:

Find all time intervals whose values are always 0 (false), output the start time and the length of each interval.

Discard the interval if its length > max_duration or < min_duration. 

min_duration and max_duration are optional.

 

 

usage:

select s1, f(s1, 'threshold'='1.5') from root.sg.d

 

 
||Time||root.sg.d.s1||f(root.sg.d.s1)||
|1|1.2|false|
|2|3.4|true|
|3|5.6|true|
|4|1.0|false|



--
This message was sent by Atlassian Jira
(v8.20.1#820001)