Class RecordCounter

    • Constructor Detail

      • RecordCounter

        public RecordCounter()
    • Method Detail

      • recordCountIsZero

        public abstract boolean recordCountIsZero​(org.apache.flink.table.data.RowData acc)
        We store the counter in the accumulator. If the counter is not zero, which means we aggregated at least one record for current key.
        Returns:
        true if input record count is zero, false if not.
      • of

        public static RecordCounter of​(int indexOfCountStar)
        Creates a RecordCounter depends on the index of count(*). If index is less than zero, returns RecordCounter.AccumulationRecordCounter, otherwise, RecordCounter.RetractionRecordCounter.
        Parameters:
        indexOfCountStar - The index of COUNT(*) in the aggregates. -1 when the input doesn't contain COUNT(*), i.e. doesn't contain retraction messages. We make sure there is a COUNT(*) if input stream contains retraction.