Class AbstractSyncStateTopNFunction

    • Field Detail

      • rankEnd

        protected long rankEnd
    • Constructor Detail

      • AbstractSyncStateTopNFunction

        public AbstractSyncStateTopNFunction​(org.apache.flink.api.common.state.StateTtlConfig ttlConfig,
                                             InternalTypeInfo<org.apache.flink.table.data.RowData> inputRowType,
                                             GeneratedRecordComparator generatedSortKeyComparator,
                                             RowDataKeySelector sortKeySelector,
                                             RankType rankType,
                                             RankRange rankRange,
                                             boolean generateUpdateBefore,
                                             boolean outputRankNumber)
    • Method Detail

      • 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 AbstractTopNFunction
        Throws:
        Exception
      • initRankEnd

        protected long initRankEnd​(org.apache.flink.table.data.RowData row)
                            throws Exception
        Initialize rank end.
        Parameters:
        row - input record
        Returns:
        rank end
        Throws:
        Exception
      • isInRankEnd

        protected boolean isInRankEnd​(long rank)
      • isInRankRange

        protected boolean isInRankRange​(long rank)
      • collectInsert

        protected void collectInsert​(org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out,
                                     org.apache.flink.table.data.RowData inputRow,
                                     long rank)
      • collectDelete

        protected void collectDelete​(org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out,
                                     org.apache.flink.table.data.RowData inputRow,
                                     long rank)
      • collectUpdateAfter

        protected void collectUpdateAfter​(org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out,
                                          org.apache.flink.table.data.RowData inputRow,
                                          long rank)
      • collectUpdateBefore

        protected void collectUpdateBefore​(org.apache.flink.util.Collector<org.apache.flink.table.data.RowData> out,
                                           org.apache.flink.table.data.RowData inputRow,
                                           long rank)