public interface Aggregator
Modifier and Type | Method and Description |
---|---|
void |
accumulate()
Adds the current row to the internal counters.
|
void |
combineInternals(ReadableStorage internals)
Adds the internal counters of another aggregator this this
aggregator's internal counters.
|
ScalarTokenType[] |
getInternalTypes()
Returns the types of the internal counters of this aggregator
|
ScalarTokenType |
getOutputType()
Returns the output type of this aggregator.
|
void |
reset()
Resets the internal counters
|
void |
setInputs(ScalarValued[] inputs)
Binds the input values for this aggregator.
|
void |
storeFinalResult(ScalarSettable output)
Outputs the final result into the specified ScalarSettable.
|
void |
storeInternals(WriteableStorage internals)
Stores the internal counters of this aggregator.
|
void |
updateInternals(ReadableStorage readView,
WriteableStorage writeView)
Updates an existing internals object with new values.
|
void setInputs(ScalarValued[] inputs)
inputs
- the sources of values to aggregatevoid accumulate()
setInputs(ScalarValued[])
.void reset()
ScalarTokenType[] getInternalTypes()
void combineInternals(ReadableStorage internals)
internals
- the internal counters of the other aggregator. Will
match the types returned by getInternalTypes()
.void storeInternals(WriteableStorage internals)
internals
- Storage in which to store this aggregators internals. Will
match the types returned by getInternalTypes()
.void updateInternals(ReadableStorage readView, WriteableStorage writeView)
storeInternals(WriteableStorage)
as this is always
safe. For GC efficiency, implementations that have mutable components may
wish to copy over those existing components rather than cloning.readView
- storage to use for loading internal counterswriteView
- storage to use for storage internal countersvoid storeFinalResult(ScalarSettable output)
output
- the output where the result is to be storedScalarTokenType getOutputType()
Copyright © 2016 Actian Corporation. All rights reserved.