Class PythonStreamGroupWindowAggregateOperator<K,​W extends org.apache.flink.table.runtime.operators.window.Window>

  • All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.state.CheckpointListener, org.apache.flink.streaming.api.operators.BoundedOneInput, org.apache.flink.streaming.api.operators.Input<org.apache.flink.table.data.RowData>, org.apache.flink.streaming.api.operators.KeyContext, org.apache.flink.streaming.api.operators.KeyContextHandler, org.apache.flink.streaming.api.operators.OneInputStreamOperator<org.apache.flink.table.data.RowData,​org.apache.flink.table.data.RowData>, org.apache.flink.streaming.api.operators.SetupableStreamOperator<org.apache.flink.table.data.RowData>, org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.table.data.RowData>, org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperator, org.apache.flink.streaming.api.operators.Triggerable<K,​W>, org.apache.flink.streaming.api.operators.YieldingOperator<org.apache.flink.table.data.RowData>

    @Internal
    public class PythonStreamGroupWindowAggregateOperator<K,​W extends org.apache.flink.table.runtime.operators.window.Window>
    extends AbstractPythonStreamAggregateOperator
    implements org.apache.flink.streaming.api.operators.Triggerable<K,​W>
    The Python Group Window AggregateFunction operator.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PythonStreamGroupWindowAggregateOperator​(org.apache.flink.configuration.Configuration config, org.apache.flink.table.types.logical.RowType inputType, org.apache.flink.table.types.logical.RowType outputType, org.apache.flink.table.functions.python.PythonAggregateFunctionInfo[] aggregateFunctions, org.apache.flink.table.runtime.dataview.DataViewSpec[][] dataViewSpecs, int[] grouping, int indexOfCountStar, boolean generateUpdateBefore, boolean countStarInserted, int inputTimeFieldIndex, org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner<W> windowAssigner, FlinkFnApi.GroupWindow.WindowType windowType, boolean isRowTime, boolean isTimeWindow, long size, long slide, long gap, long allowedLateness, org.apache.flink.table.runtime.groupwindow.NamedWindowProperty[] namedProperties, java.time.ZoneId shiftTimeZone)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FlinkFnApi.CoderInfoDescriptor createInputCoderInfoDescriptor​(org.apache.flink.table.types.logical.RowType runnerInputType)  
      FlinkFnApi.CoderInfoDescriptor createOutputCoderInfoDescriptor​(org.apache.flink.table.types.logical.RowType runnerOutType)  
      static <K,​W extends org.apache.flink.table.runtime.operators.window.Window>
      PythonStreamGroupWindowAggregateOperator<K,​W>
      createSessionGroupWindowAggregateOperator​(org.apache.flink.configuration.Configuration config, org.apache.flink.table.types.logical.RowType inputType, org.apache.flink.table.types.logical.RowType outputType, org.apache.flink.table.functions.python.PythonAggregateFunctionInfo[] aggregateFunctions, org.apache.flink.table.runtime.dataview.DataViewSpec[][] dataViewSpecs, int[] grouping, int indexOfCountStar, boolean generateUpdateBefore, boolean countStarInserted, int inputTimeFieldIndex, org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner<W> windowAssigner, boolean isRowTime, long gap, long allowedLateness, org.apache.flink.table.runtime.groupwindow.NamedWindowProperty[] namedProperties, java.time.ZoneId shiftTimeZone)  
      static <K,​W extends org.apache.flink.table.runtime.operators.window.Window>
      PythonStreamGroupWindowAggregateOperator<K,​W>
      createSlidingGroupWindowAggregateOperator​(org.apache.flink.configuration.Configuration config, org.apache.flink.table.types.logical.RowType inputType, org.apache.flink.table.types.logical.RowType outputType, org.apache.flink.table.functions.python.PythonAggregateFunctionInfo[] aggregateFunctions, org.apache.flink.table.runtime.dataview.DataViewSpec[][] dataViewSpecs, int[] grouping, int indexOfCountStar, boolean generateUpdateBefore, boolean countStarInserted, int inputTimeFieldIndex, org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner<W> windowAssigner, boolean isRowTime, boolean isTimeWindow, long size, long slide, long allowedLateness, org.apache.flink.table.runtime.groupwindow.NamedWindowProperty[] namedProperties, java.time.ZoneId shiftTimeZone)  
      static <K,​W extends org.apache.flink.table.runtime.operators.window.Window>
      PythonStreamGroupWindowAggregateOperator<K,​W>
      createTumblingGroupWindowAggregateOperator​(org.apache.flink.configuration.Configuration config, org.apache.flink.table.types.logical.RowType inputType, org.apache.flink.table.types.logical.RowType outputType, org.apache.flink.table.functions.python.PythonAggregateFunctionInfo[] aggregateFunctions, org.apache.flink.table.runtime.dataview.DataViewSpec[][] dataViewSpecs, int[] grouping, int indexOfCountStar, boolean generateUpdateBefore, boolean countStarInserted, int inputTimeFieldIndex, org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner<W> windowAssigner, boolean isRowTime, boolean isTimeWindow, long size, long allowedLateness, org.apache.flink.table.runtime.groupwindow.NamedWindowProperty[] namedProperties, java.time.ZoneId shiftTimeZone)  
      org.apache.flink.table.types.logical.RowType createUserDefinedFunctionInputType()  
      org.apache.flink.table.types.logical.RowType createUserDefinedFunctionOutputType()  
      void emitResult​(org.apache.flink.api.java.tuple.Tuple3<String,​byte[],​Integer> resultTuple)
      Sends the execution result to the downstream operator.
      String getFunctionUrn()  
      protected FlinkFnApi.UserDefinedAggregateFunctions getUserDefinedFunctionsProto()
      Gets the proto representation of the Python user-defined aggregate functions to be executed.
      org.apache.flink.api.common.typeutils.TypeSerializer<W> getWindowSerializer()  
      void onEventTime​(org.apache.flink.streaming.api.operators.InternalTimer<K,​W> timer)  
      void onProcessingTime​(org.apache.flink.streaming.api.operators.InternalTimer<K,​W> timer)  
      void open()  
      void processElementInternal​(org.apache.flink.table.data.RowData value)  
      • Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperator

        getChainingStrategy, getContainingTask, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getStateKeySelector1, getStateKeySelector2, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setKeyContextElement1, setKeyContextElement2, setMailboxExecutor, setProcessingTimeService, setup, snapshotState, snapshotState, useSplittableTimers
      • Methods inherited from interface org.apache.flink.api.common.state.CheckpointListener

        notifyCheckpointAborted, notifyCheckpointComplete
      • Methods inherited from interface org.apache.flink.streaming.api.operators.Input

        processLatencyMarker, processRecordAttributes, processWatermark, processWatermarkStatus
      • Methods inherited from interface org.apache.flink.streaming.api.operators.KeyContextHandler

        hasKeyContext
      • Methods inherited from interface org.apache.flink.streaming.api.operators.OneInputStreamOperator

        setKeyContextElement
      • Methods inherited from interface org.apache.flink.streaming.api.operators.StreamOperator

        close, finish, getMetricGroup, getOperatorAttributes, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotState
    • Constructor Detail

      • PythonStreamGroupWindowAggregateOperator

        protected PythonStreamGroupWindowAggregateOperator​(org.apache.flink.configuration.Configuration config,
                                                           org.apache.flink.table.types.logical.RowType inputType,
                                                           org.apache.flink.table.types.logical.RowType outputType,
                                                           org.apache.flink.table.functions.python.PythonAggregateFunctionInfo[] aggregateFunctions,
                                                           org.apache.flink.table.runtime.dataview.DataViewSpec[][] dataViewSpecs,
                                                           int[] grouping,
                                                           int indexOfCountStar,
                                                           boolean generateUpdateBefore,
                                                           boolean countStarInserted,
                                                           int inputTimeFieldIndex,
                                                           org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner<W> windowAssigner,
                                                           FlinkFnApi.GroupWindow.WindowType windowType,
                                                           boolean isRowTime,
                                                           boolean isTimeWindow,
                                                           long size,
                                                           long slide,
                                                           long gap,
                                                           long allowedLateness,
                                                           org.apache.flink.table.runtime.groupwindow.NamedWindowProperty[] namedProperties,
                                                           java.time.ZoneId shiftTimeZone)
    • Method Detail

      • createTumblingGroupWindowAggregateOperator

        public static <K,​W extends org.apache.flink.table.runtime.operators.window.Window> PythonStreamGroupWindowAggregateOperator<K,​W> createTumblingGroupWindowAggregateOperator​(org.apache.flink.configuration.Configuration config,
                                                                                                                                                                                                org.apache.flink.table.types.logical.RowType inputType,
                                                                                                                                                                                                org.apache.flink.table.types.logical.RowType outputType,
                                                                                                                                                                                                org.apache.flink.table.functions.python.PythonAggregateFunctionInfo[] aggregateFunctions,
                                                                                                                                                                                                org.apache.flink.table.runtime.dataview.DataViewSpec[][] dataViewSpecs,
                                                                                                                                                                                                int[] grouping,
                                                                                                                                                                                                int indexOfCountStar,
                                                                                                                                                                                                boolean generateUpdateBefore,
                                                                                                                                                                                                boolean countStarInserted,
                                                                                                                                                                                                int inputTimeFieldIndex,
                                                                                                                                                                                                org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner<W> windowAssigner,
                                                                                                                                                                                                boolean isRowTime,
                                                                                                                                                                                                boolean isTimeWindow,
                                                                                                                                                                                                long size,
                                                                                                                                                                                                long allowedLateness,
                                                                                                                                                                                                org.apache.flink.table.runtime.groupwindow.NamedWindowProperty[] namedProperties,
                                                                                                                                                                                                java.time.ZoneId shiftTimeZone)
      • createSlidingGroupWindowAggregateOperator

        public static <K,​W extends org.apache.flink.table.runtime.operators.window.Window> PythonStreamGroupWindowAggregateOperator<K,​W> createSlidingGroupWindowAggregateOperator​(org.apache.flink.configuration.Configuration config,
                                                                                                                                                                                               org.apache.flink.table.types.logical.RowType inputType,
                                                                                                                                                                                               org.apache.flink.table.types.logical.RowType outputType,
                                                                                                                                                                                               org.apache.flink.table.functions.python.PythonAggregateFunctionInfo[] aggregateFunctions,
                                                                                                                                                                                               org.apache.flink.table.runtime.dataview.DataViewSpec[][] dataViewSpecs,
                                                                                                                                                                                               int[] grouping,
                                                                                                                                                                                               int indexOfCountStar,
                                                                                                                                                                                               boolean generateUpdateBefore,
                                                                                                                                                                                               boolean countStarInserted,
                                                                                                                                                                                               int inputTimeFieldIndex,
                                                                                                                                                                                               org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner<W> windowAssigner,
                                                                                                                                                                                               boolean isRowTime,
                                                                                                                                                                                               boolean isTimeWindow,
                                                                                                                                                                                               long size,
                                                                                                                                                                                               long slide,
                                                                                                                                                                                               long allowedLateness,
                                                                                                                                                                                               org.apache.flink.table.runtime.groupwindow.NamedWindowProperty[] namedProperties,
                                                                                                                                                                                               java.time.ZoneId shiftTimeZone)
      • createSessionGroupWindowAggregateOperator

        public static <K,​W extends org.apache.flink.table.runtime.operators.window.Window> PythonStreamGroupWindowAggregateOperator<K,​W> createSessionGroupWindowAggregateOperator​(org.apache.flink.configuration.Configuration config,
                                                                                                                                                                                               org.apache.flink.table.types.logical.RowType inputType,
                                                                                                                                                                                               org.apache.flink.table.types.logical.RowType outputType,
                                                                                                                                                                                               org.apache.flink.table.functions.python.PythonAggregateFunctionInfo[] aggregateFunctions,
                                                                                                                                                                                               org.apache.flink.table.runtime.dataview.DataViewSpec[][] dataViewSpecs,
                                                                                                                                                                                               int[] grouping,
                                                                                                                                                                                               int indexOfCountStar,
                                                                                                                                                                                               boolean generateUpdateBefore,
                                                                                                                                                                                               boolean countStarInserted,
                                                                                                                                                                                               int inputTimeFieldIndex,
                                                                                                                                                                                               org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner<W> windowAssigner,
                                                                                                                                                                                               boolean isRowTime,
                                                                                                                                                                                               long gap,
                                                                                                                                                                                               long allowedLateness,
                                                                                                                                                                                               org.apache.flink.table.runtime.groupwindow.NamedWindowProperty[] namedProperties,
                                                                                                                                                                                               java.time.ZoneId shiftTimeZone)
      • getWindowSerializer

        public org.apache.flink.api.common.typeutils.TypeSerializer<W> getWindowSerializer()
      • onEventTime

        public void onEventTime​(org.apache.flink.streaming.api.operators.InternalTimer<K,​W> timer)
                         throws Exception
        Specified by:
        onEventTime in interface org.apache.flink.streaming.api.operators.Triggerable<K,​W extends org.apache.flink.table.runtime.operators.window.Window>
        Throws:
        Exception
      • onProcessingTime

        public void onProcessingTime​(org.apache.flink.streaming.api.operators.InternalTimer<K,​W> timer)
                              throws Exception
        Specified by:
        onProcessingTime in interface org.apache.flink.streaming.api.operators.Triggerable<K,​W extends org.apache.flink.table.runtime.operators.window.Window>
        Throws:
        Exception