Package io.lenses.sql.udf
Interface UserDefinedTableAggregateFunction
-
- All Superinterfaces:
UserDefinedAggregateFunction,UserDefinedFunction
public interface UserDefinedTableAggregateFunction extends UserDefinedAggregateFunction
Interface for User Defined Table Aggregate Functions. Table-based aggregate functions need to provide a subtract method that handles removal of values.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Valuesubtract(Value aggregateKey, Value aggregatedValue, Value toBeSubtracted)Handles removal of a value from the aggregation.-
Methods inherited from interface io.lenses.sql.udf.UserDefinedAggregateFunction
add, empty, finalStep, init, merge, typer
-
Methods inherited from interface io.lenses.sql.udf.UserDefinedFunction
name, owner, version
-
-
-
-
Method Detail
-
subtract
Value subtract(Value aggregateKey, Value aggregatedValue, Value toBeSubtracted) throws UdfException
Handles removal of a value from the aggregation.- Parameters:
aggregateKey- The key of the field being aggregated on.aggregatedValue- The current aggregated value.toBeSubtracted- The value to be subtracted from the current aggregated value.- Returns:
- The updated aggregated value.
- Throws:
UdfException- if the subtraction failed.
-
-