Interface DistinctOperatorFactory


public interface DistinctOperatorFactory
A factory interface to create operators for the AggType.Distinct AggType.CountDistinct, AggType.Unique and their rollup counterparts
  • 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 an operator for the AggType.CountDistinct aggregation.
      Parameters:
      type - the type of the column
      resultName - the name of the result column
      countNulls - 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 an operator for the AggType.Distinct aggregation.
      Parameters:
      type - the type of the column
      resultName - the name of the result column
      countNulls - 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 an operator for the AggType.Unique aggregation.
      Parameters:
      type - the type of the column
      resultName - the name of the result column
      countNulls - 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

      static void checkType(String resultColName, String valueIntent, Class<?> expected, Object value)
    • checkNumericCompatibility

      static boolean checkNumericCompatibility(Number value, Class<?> expected)