Class BoolXorAccumulator
java.lang.Object
dev.frostlake.functions.aggregate.BoolXorAccumulator
- All Implemented Interfaces:
AggregateFunction.Accumulator
Accumulator for
BoolXorAgg.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccumulate(Object v) Folds one row's argument value into the running state.TRUE when EXACTLY ONE input is true — three trues are FALSE on the account, not a parity.voidFolds another accumulator's state into this one, combining two partial aggregations of the same group.voidreset()Clears the state back to the empty-group starting point so the accumulator can be reused.
-
Constructor Details
-
BoolXorAccumulator
public BoolXorAccumulator()
-
-
Method Details
-
accumulate
Description copied from interface:AggregateFunction.AccumulatorFolds one row's argument value into the running state.- Specified by:
accumulatein interfaceAggregateFunction.Accumulator- Parameters:
v- the aggregate argument's value for one row; SQL NULL arrives asnull
-
getResult
TRUE when EXACTLY ONE input is true — three trues are FALSE on the account, not a parity.- Specified by:
getResultin interfaceAggregateFunction.Accumulator- Returns:
- the group's result, or
nullwhere the aggregate defines an empty group as NULL
-
reset
public void reset()Description copied from interface:AggregateFunction.AccumulatorClears the state back to the empty-group starting point so the accumulator can be reused.- Specified by:
resetin interfaceAggregateFunction.Accumulator
-
merge
Description copied from interface:AggregateFunction.AccumulatorFolds another accumulator's state into this one, combining two partial aggregations of the same group.- Specified by:
mergein interfaceAggregateFunction.Accumulator- Parameters:
other- a partial state of the same aggregate implementation
-