[
https://issues.apache.org/jira/browse/IOTDB-5421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lei Rui reassigned IOTDB-5421:
------------------------------
Assignee: Lei Rui
> Add sampling attributes for M4
> ------------------------------
>
> Key: IOTDB-5421
> URL: https://issues.apache.org/jira/browse/IOTDB-5421
> Project: Apache IoTDB
> Issue Type: New Feature
> Reporter: Lei Rui
> Assignee: Lei Rui
> Priority: Major
>
> Previously, the M4 function supports two types of attribute inputs (actually
> two types of sliding windows):
> (1) Control the sliding *size* window using attributes {{windowSize}} and
> {{{}slidingStep{}}}. For example: {{{}select
> M4(s1,'windowSize'='10','slidingStep'='10') as samples from
> root.vehicle.d1{}}}.
> (2) Control the sliding *time* window using attributes
> {{{}windowInterval{}}}, {{{}slidingStep{}}}, {{displayWindowBegin}} and
> {{{}displayWindowEnd{}}}. For example: {{{}select
> M4(s1,'windowInterval'='25','slidingStep'='25','displayWindowBegin'='0','displayWindowEnd'='100')
> as samples from root.vehicle.d1{}}}.
> As proposes in a real use case (ZhongHe&DWF), the user wants to control M4
> behaviors using the following sampling attributes: {{{}samplingInterval{}}},
> {{{}samplingThreshold{}}}, {{{}displayWindowBegin{}}},
> {{{}displayWindowEnd{}}}. For example: {{{}select
> M4(s1,'samplingInterval'='5','samplingThreshold'='100','displayWindowBegin'='0','displayWindowEnd'='150')
> as samples from root.vehicle.d1{}}}.
> * {{{}samplingInterval{}}}: The sampling time interval length. Long data
> type. {*}Required{*}.
> * {{{}samplingThreshold{}}}: The upper limit of the number of sampling
> points. Long data type. Optional. If not set, default to 10000.
> * {{{}displayWindowBegin{}}}: The starting position of the window
> (included). Long data type. {*}Required{*}.
> * {{{}displayWindowEnd{}}}: End time limit (excluded, essentially playing
> the same role as {{{}WHERE time < displayWindowEnd{}}}). Long data type.
> {*}Required{*}.
> The user-defined sampling time window is a special kind of sliding time
> window, which is special in that:
> # There is a conversion relationship between the length of the sliding time
> window {{windowInterval}} and the sampling time interval {{samplingInterval.
> }}Note that here user *indirectly* controls the window time length
> {{{}windowInterval{}}}.
> # The sliding step of the sliding time window {{slidingStep}} is fixed to be
> equal to the window length {{windowInterval}} here, so there is no need for
> the user to input the {{slidingStep}} parameter.
> # {{displayWindowBegin}} and {{displayWindowEnd}} are required parameters
> here.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)