Class ProcTimeRangeBoundedPrecedingFunction<K>

java.lang.Object
org.apache.flink.api.common.functions.AbstractRichFunction
org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
org.apache.flink.table.runtime.operators.over.ProcTimeRangeBoundedPrecedingFunction<K>
All Implemented Interfaces:
Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.common.functions.RichFunction

public class ProcTimeRangeBoundedPrecedingFunction<K> extends org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
Process Function used for the aggregate in bounded proc-time OVER window.

E.g.: SELECT currtime, b, c, min(c) OVER (PARTITION BY b ORDER BY proctime RANGE BETWEEN INTERVAL '4' SECOND PRECEDING AND CURRENT ROW), max(c) OVER (PARTITION BY b ORDER BY proctime RANGE BETWEEN INTERVAL '4' SECOND PRECEDING AND CURRENT ROW) FROM T.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.flink.streaming.api.functions.KeyedProcessFunction

    org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context, org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProcTimeRangeBoundedPrecedingFunction(GeneratedAggsHandleFunction genAggsHandler, org.apache.flink.table.types.logical.LogicalType[] accTypes, org.apache.flink.table.types.logical.LogicalType[] inputFieldTypes, long precedingTimeBoundary)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    onTimer(long timestamp, org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>.org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out)
     
    void
    open(org.apache.flink.api.common.functions.OpenContext openContext)
     
    void
    processElement(org.apache.flink.table.data.RowData input, org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>.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.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
  • Constructor Details

    • ProcTimeRangeBoundedPrecedingFunction

      public ProcTimeRangeBoundedPrecedingFunction(GeneratedAggsHandleFunction genAggsHandler, org.apache.flink.table.types.logical.LogicalType[] accTypes, org.apache.flink.table.types.logical.LogicalType[] inputFieldTypes, long precedingTimeBoundary)
  • Method Details

    • open

      public void open(org.apache.flink.api.common.functions.OpenContext openContext) throws Exception
      Specified by:
      open in interface org.apache.flink.api.common.functions.RichFunction
      Overrides:
      open in class org.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<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>.org.apache.flink.streaming.api.functions.KeyedProcessFunction.Context ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) throws Exception
      Specified by:
      processElement in class org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
      Throws:
      Exception
    • onTimer

      public void onTimer(long timestamp, org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>.org.apache.flink.streaming.api.functions.KeyedProcessFunction.OnTimerContext ctx, org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out) throws Exception
      Overrides:
      onTimer in class org.apache.flink.streaming.api.functions.KeyedProcessFunction<K,org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>
      Throws:
      Exception
    • close

      public void close() throws Exception
      Specified by:
      close in interface org.apache.flink.api.common.functions.RichFunction
      Overrides:
      close in class org.apache.flink.api.common.functions.AbstractRichFunction
      Throws:
      Exception