Class IntChunkedUniqueOperator

java.lang.Object
io.deephaven.engine.table.impl.by.ssmcountdistinct.unique.IntChunkedUniqueOperator
All Implemented Interfaces:
IterativeChunkedAggregationOperator

public class IntChunkedUniqueOperator extends Object implements IterativeChunkedAggregationOperator
This operator computes the single unique value of a particular aggregated state. If there are no values at all the 'no value key' is used. If there are more than one values for the state, the 'non unique key' is used.

A state holding zero values or one distinct value is stored without a SSM: the value lives in internalResult and its multiplicity in singletonCount. singletonCount encodes the state: NULL_LONG or 0 means empty, > 0 means the single value in internalResult is present that many times, and -1 means the state holds two or more distinct values and an SSM in ssms holds them. An SSM is created only when a state actually becomes non-unique, and is discarded when removals collapse it back to a single distinct value (or empty).