public interface ReductionProducer<UR extends ExpressionTarget>
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<ExpressionTuple,ReductionMapResult> |
getIndexedReductionMap(java.util.Set<ReductionTarget> property,
RecordSelector selector)
General reduction operation.
|
<T> T |
getReduction(ReductionTarget<T> target,
RecordSelector sel)
Perform a reduction over a set of records
|
<I> java.util.Map<I,java.lang.Number> |
getReductionMap(PropExpression<I> index,
ReductionTarget<java.lang.Number> property,
RecordSelector selector)
sum the specified numerical quantity over all records that match the selector
grouped by the other specified property
|
<T> T getReduction(ReductionTarget<T> target, RecordSelector sel) throws java.lang.Exception
java.lang.Exceptiontarget - ReductionTarget specifying reduction to performsel - RecordSelector to select target recordsjava.util.Map<ExpressionTuple,ReductionMapResult> getIndexedReductionMap(java.util.Set<ReductionTarget> property, RecordSelector selector) throws java.lang.Exception
ReductionTarget objects. This method generates
Maps from the requested ReductionTarget to the result of the corresponding reduction.
If the list of ReductionTargets contains any IndexReduction objects then multiple results will
be returned so these results are themselves returned as a Map indexed by PropertyTuple objects
representing the Index values. If there are no IndexValues an empty PropertyTuple will be used.
A non-index target that does not resolve may be ignored or return the default value for
the ReductionTarget. This is so target set compatible with composite UsageProducers
can contain targets only relevant to some of its parts without suppressing all output from the
tables that don't support the property. This does run the risk that spurious index-tuples
might be generated from tables that support none of the non-index targets.
In that case the producer has to be tuned.java.lang.Exceptionproperty - selector - <I> java.util.Map<I,java.lang.Number> getReductionMap(PropExpression<I> index, ReductionTarget<java.lang.Number> property, RecordSelector selector) throws java.lang.Exception
java.lang.ExceptionI - index - property - selector -