Class RowTimeRowsBoundedPrecedingFunction<K>
- java.lang.Object
-
- org.apache.flink.api.common.functions.AbstractRichFunction
-
- org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,IN,OUT>
-
- org.apache.flink.table.runtime.functions.KeyedProcessFunctionWithCleanupState<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
-
- org.apache.flink.table.runtime.operators.over.RowTimeRowsBoundedPrecedingFunction<K>
-
- All Implemented Interfaces:
Serializable,org.apache.flink.api.common.functions.Function,org.apache.flink.api.common.functions.RichFunction,CleanupState
public class RowTimeRowsBoundedPrecedingFunction<K> extends KeyedProcessFunctionWithCleanupState<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
Process Function for ROWS clause event-time bounded OVER window.E.g.: SELECT rowtime, b, c, min(c) OVER (PARTITION BY b ORDER BY rowtime ROWS BETWEEN 2 PRECEDING AND CURRENT ROW), max(c) OVER (PARTITION BY b ORDER BY rowtime ROWS BETWEEN 2 PRECEDING AND CURRENT ROW) FROM T.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.flink.table.runtime.functions.KeyedProcessFunctionWithCleanupState
stateCleaningEnabled
-
-
Constructor Summary
Constructors Constructor Description RowTimeRowsBoundedPrecedingFunction(long minRetentionTime, long maxRetentionTime, GeneratedAggsHandleFunction genAggsHandler, org.apache.flink.table.types.logical.LogicalType[] accTypes, org.apache.flink.table.types.logical.LogicalType[] inputFieldTypes, long precedingOffset, int rowTimeIdx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected org.apache.flink.metrics.CountergetCounter()voidonTimer(long timestamp, org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)voidopen(org.apache.flink.configuration.Configuration parameters)voidprocessElement(org.apache.flink.table.data.RowData input, org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)-
Methods inherited from class org.apache.flink.table.runtime.functions.KeyedProcessFunctionWithCleanupState
cleanupState, initCleanupTimeState, isProcessingTimeTimer, needToCleanupState, registerProcessingCleanupTimer
-
Methods inherited from class org.apache.flink.api.common.functions.AbstractRichFunction
getIterationRuntimeContext, getRuntimeContext, setRuntimeContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.runtime.functions.CleanupState
registerProcessingCleanupTimer
-
-
-
-
Constructor Detail
-
RowTimeRowsBoundedPrecedingFunction
public RowTimeRowsBoundedPrecedingFunction(long minRetentionTime, long maxRetentionTime, GeneratedAggsHandleFunction genAggsHandler, org.apache.flink.table.types.logical.LogicalType[] accTypes, org.apache.flink.table.types.logical.LogicalType[] inputFieldTypes, long precedingOffset, int rowTimeIdx)
-
-
Method Detail
-
getCounter
@VisibleForTesting protected org.apache.flink.metrics.Counter getCounter()
-
open
public void open(org.apache.flink.configuration.Configuration parameters) throws Exception- Specified by:
openin interfaceorg.apache.flink.api.common.functions.RichFunction- Overrides:
openin classorg.apache.flink.api.common.functions.AbstractRichFunction- Throws:
Exception
-
processElement
public void processElement(org.apache.flink.table.data.RowData input, org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) throws Exception
-
onTimer
public void onTimer(long timestamp, org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) throws Exception
-
-