Interface DistinctOperatorFactory
public interface DistinctOperatorFactory
A factory interface to create
operators for the AggType.Distinct
AggType.CountDistinct, AggType.Unique and their rollup counterparts-
Field Summary
Fields Modifier and Type Field Description static intNODE_SIZE -
Method Summary
Static Methods Modifier and Type Method Description static booleancheckNumericCompatibility(Number value, Class<?> expected)static voidcheckType(String resultColName, String valueIntent, Class<?> expected, Object value)static IterativeChunkedAggregationOperatorcreateCountDistinct(Class<?> type, String resultName, boolean countNulls, boolean exposeInternal, boolean isRollup)Create anoperatorfor theAggType.CountDistinctaggregation.static IterativeChunkedAggregationOperatorcreateDistinct(Class<?> type, String resultName, boolean countNulls, boolean exposeInternal, boolean isRollup)Create anoperatorfor theAggType.Distinctaggregation.static IterativeChunkedAggregationOperatorcreateUnique(Class<?> type, String resultName, boolean countNulls, boolean exposeInternal, Object noKeyValue, Object nonUniqueValue, boolean isRollup)Create anoperatorfor theAggType.Uniqueaggregation.
-
Field Details
-
NODE_SIZE
static final int NODE_SIZE
-
-
Method Details
-
createCountDistinct
static IterativeChunkedAggregationOperator createCountDistinct(Class<?> type, String resultName, boolean countNulls, boolean exposeInternal, boolean isRollup)Create anoperatorfor theAggType.CountDistinctaggregation.- Parameters:
type- the type of the columnresultName- the name of the result columncountNulls- true if null values should be counted as important values, or false if they should be ignored.exposeInternal- true if the underlying SSM state should be exposed as a column (for use with rollups)isRollup- true if the returned operator should be suitable for second or higher levels of rollup aggregation- Returns:
- an appropriate operator.
-
createDistinct
static IterativeChunkedAggregationOperator createDistinct(Class<?> type, String resultName, boolean countNulls, boolean exposeInternal, boolean isRollup)Create anoperatorfor theAggType.Distinctaggregation.- Parameters:
type- the type of the columnresultName- the name of the result columncountNulls- true if null values should be counted as important values, or false if they should be ignored.exposeInternal- true if the underlying SSM state should be exposed as a column (for use with rollups)isRollup- true if the returned operator should be suitable for second or higher levels of rollup aggregation- Returns:
- an appropriate operator.
-
createUnique
static IterativeChunkedAggregationOperator createUnique(Class<?> type, String resultName, boolean countNulls, boolean exposeInternal, Object noKeyValue, Object nonUniqueValue, boolean isRollup)Create anoperatorfor theAggType.Uniqueaggregation.- Parameters:
type- the type of the columnresultName- the name of the result columncountNulls- true if null values should be counted as important values, or false if they should be ignored.exposeInternal- true if the underlying SSM state should be exposed as a column (for use with rollups)isRollup- true if the returned operator should be suitable for second or higher levels of rollup aggregation- Returns:
- an appropriate operator.
-
checkType
-
checkNumericCompatibility
-