Class AbstractWindowAggProcessor<W>

    • Field Detail

      • accSerializer

        protected final org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer
      • isEventTime

        protected final boolean isEventTime
      • shiftTimeZone

        protected final java.time.ZoneId shiftTimeZone
      • useDayLightSaving

        protected final boolean useDayLightSaving
        The shift timezone is using DayLightSaving time or not.
      • currentProgress

        protected transient long currentProgress
      • clockService

        protected transient ClockService clockService
      • windowState

        protected transient WindowValueState<W> windowState
        state schema: [key, window, accumulator].
      • reuseOutput

        protected transient org.apache.flink.table.data.utils.JoinedRowData reuseOutput
    • Constructor Detail

      • AbstractWindowAggProcessor

        public AbstractWindowAggProcessor​(GeneratedNamespaceAggsHandleFunction<W> genAggsHandler,
                                          WindowAssigner sliceAssigner,
                                          org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer,
                                          boolean isEventTime,
                                          int indexOfCountStar,
                                          java.time.ZoneId shiftTimeZone)
    • Method Detail

      • initializeWatermark

        public void initializeWatermark​(long watermark)
        Description copied from interface: WindowProcessor
        Initializes the watermark which restores from state. The method is called after open method and before the actual working methods.
        Specified by:
        initializeWatermark in interface WindowProcessor<W>
        Parameters:
        watermark - the initial watermark
      • close

        public void close()
                   throws Exception
        Description copied from interface: WindowProcessor
        The tear-down method of the function. It is called after the last call to the main working methods.
        Specified by:
        close in interface WindowProcessor<W>
        Throws:
        Exception
      • collect

        protected void collect​(org.apache.flink.table.data.RowData aggResult)
        Send result to downstream.

        The RowKind of the results is always RowKind.INSERT.

        TODO support early fire / late file to produce changelog result.