Class StringLastFoldingAggregatorFactory

All Implemented Interfaces:
Cacheable

public class StringLastFoldingAggregatorFactory extends StringLastAggregatorFactory
For backwards compatibility; equivalent to a regular StringLastAggregatorFactory.
  • Constructor Details

    • StringLastFoldingAggregatorFactory

      public StringLastFoldingAggregatorFactory(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 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 StringLastAggregatorFactory
      Parameters:
      newName - newName of the output for aggregator factory
      Returns:
      AggregatorFactory with the output name set as the input param.