Class StringFirstFoldingAggregatorFactory

All Implemented Interfaces:
Cacheable

public class StringFirstFoldingAggregatorFactory extends StringFirstAggregatorFactory
For backwards compatibility; equivalent to a regular StringFirstAggregatorFactory.
  • Constructor Details

    • StringFirstFoldingAggregatorFactory

      public StringFirstFoldingAggregatorFactory(String name, String fieldName, Integer maxStringBytes)
  • Method Details

    • withName

      public AggregatorFactory withName(String newName)
      Description copied from class: AggregatorFactory
      Used in cases where we want to change the output name of the aggregator to something else. For eg: if we have a query `select a, sum(b) as total group by a from table` the aggregator returned from the native group by query is "a0" set in
      invalid reference
      org.apache.druid.sql.calcite.rel.DruidQuery#computeAggregations
      . We can use withName("total") to set the output name of the aggregator to "total".

      As all implementations of this interface method may not exist, callers of this method are advised to handle such a case.

      Overrides:
      withName in class StringFirstAggregatorFactory
      Parameters:
      newName - newName of the output for aggregator factory
      Returns:
      AggregatorFactory with the output name set as the input param.