public abstract class RecordCounter extends Object implements Serializable
RecordCounter
is used to count the number of input records under the current key.Constructor and Description |
---|
RecordCounter() |
Modifier and Type | Method and Description |
---|---|
static RecordCounter |
of(int indexOfCountStar)
Creates a
RecordCounter depends on the index of count(*). |
abstract boolean |
recordCountIsZero(RowData acc)
We store the counter in the accumulator.
|
public abstract boolean recordCountIsZero(RowData acc)
public static RecordCounter of(int indexOfCountStar)
RecordCounter
depends on the index of count(*). If index is less than zero,
returns AccumulationRecordCounter
, otherwise, RetractionRecordCounter
.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.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.