public abstract class GeneratedAggregations extends Object implements Function
Constructor and Description |
---|
GeneratedAggregations() |
Modifier and Type | Method and Description |
---|---|
abstract void |
accumulate(Row accumulators,
Row input)
Accumulates the input values to the accumulators.
|
abstract Row |
createAccumulators()
Initializes the accumulators and save them to a accumulators row.
|
abstract Row |
createOutputRow()
Creates an output row object with the correct arity.
|
abstract Row |
mergeAccumulatorsPair(Row a,
Row b)
Merges two rows of accumulators into one row.
|
abstract void |
resetAccumulator(Row accumulators)
Resets all the accumulators.
|
abstract void |
retract(Row accumulators,
Row input)
Retracts the input values from the accumulators.
|
abstract void |
setAggregationResults(Row accumulators,
Row output)
Sets the results of the aggregations (partial or final) to the output row.
|
abstract void |
setConstantFlags(Row output)
Sets constant flags (boolean fields) to an output row.
|
abstract void |
setForwardedFields(Row input,
Row output)
Copies forwarded fields, such as grouping keys, from input row to output row.
|
public abstract void setAggregationResults(Row accumulators, Row output)
accumulators
- the accumulators (saved in a row) which contains the current
aggregated resultsoutput
- output results collected in a rowpublic abstract void setForwardedFields(Row input, Row output)
input
- input values bundled in a rowoutput
- output results collected in a rowpublic abstract void setConstantFlags(Row output)
output
- The output row to which the constant flags are set.public abstract void accumulate(Row accumulators, Row input)
accumulators
- the accumulators (saved in a row) which contains the current
aggregated resultsinput
- input values bundled in a rowpublic abstract void retract(Row accumulators, Row input)
accumulators
- the accumulators (saved in a row) which contains the current
aggregated resultsinput
- input values bundled in a rowpublic abstract Row createAccumulators()
public abstract Row createOutputRow()
public abstract Row mergeAccumulatorsPair(Row a, Row b)
a
- First row of accumulatorsb
- The other row of accumulatorspublic abstract void resetAccumulator(Row accumulators)
accumulators
- the accumulators (saved in a row) which contains the current
aggregated resultsCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.