Class ExpandableAggregationFunction

java.lang.Object
cern.nxcals.api.custom.service.aggregation.AggregationFunction
cern.nxcals.api.custom.service.aggregation.ExpandableAggregationFunction

public abstract class ExpandableAggregationFunction extends AggregationFunction
  • Field Details

    • RECORDS_ROW_WINDOW

      protected static final org.apache.spark.sql.expressions.WindowSpec RECORDS_ROW_WINDOW
  • Method Details

    • expandTimeWindowBy

      public ExpandableAggregationFunction expandTimeWindowBy(long amountBefore, long amountAfter, @NonNull @NonNull TemporalUnit unit)
      Replaces the default data query time window expansion associated with this AggregationFunctions implementation.
      Parameters:
      amountBefore - the amount of the duration to expand, before the start time of query time window, measured in terms of the unit. Parameter should be a positive value and would be validated against that expectation
      amountAfter - the amount of the duration to expand, after the end time of query time window, measured in terms of the unit. Parameter should be a positive value and would be validated against that expectation
      unit - the unit that the duration is measured in, must have an exact duration, not null
      Returns:
      a new ExpandableAggregationFunction based on this function containing the specified time window expansion settings