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 Summary
Fields Modifier and Type Field Description protected static org.apache.spark.sql.expressions.WindowSpec
RECORDS_ROW_WINDOW
-
Fields inherited from class cern.nxcals.api.custom.service.aggregation.AggregationFunction
TIMESTAMP_COLUMN_NAME, VALUE_COLUMN_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExpandableAggregationFunction
expandTimeWindowBy(long amountBefore, long amountAfter, @NonNull java.time.temporal.TemporalUnit unit)
Replaces the default data query time window expansion associated with thisAggregationFunctions
implementation.-
Methods inherited from class cern.nxcals.api.custom.service.aggregation.AggregationFunction
getTimeWindowExpansion
-
-
-
-
Method Detail
-
expandTimeWindowBy
public ExpandableAggregationFunction expandTimeWindowBy(long amountBefore, long amountAfter, @NonNull @NonNull java.time.temporal.TemporalUnit unit)
Replaces the default data query time window expansion associated with thisAggregationFunctions
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 expectationamountAfter
- 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 expectationunit
- 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
-
-