- All Implemented Interfaces:
- Serializable
public class VectorAggregationDesc
extends Object
implements Serializable
VectorAggregationDesc.
Mode is GenericUDAFEvaluator.Mode.
It is the different modes for an aggregate UDAF (User Defined Aggregation Function).
(Notice the these names are a subset of GroupByDesc.Mode...)
PARTIAL1 Original data --> Partial aggregation data
PARTIAL2 Partial aggregation data --> Partial aggregation data
FINAL Partial aggregation data --> Full aggregation data
COMPLETE Original data --> Full aggregation data
SIMPLEST CASE --> The data type/semantics of original data, partial aggregation
data, and full aggregation data ARE THE SAME. E.g. MIN, MAX, SUM. The different
modes can be handled by one aggregation class.
This case has a null for the Mode.
FOR OTHERS --> The data type/semantics of partial aggregation data and full aggregation data
ARE THE SAME but different than original data. This results in 2 aggregation classes:
1) A class that takes original rows and outputs partial/full aggregation
(PARTIAL1/COMPLETE)
and
2) A class that takes partial aggregation and produces full aggregation
(PARTIAL2/FINAL).
E.g. COUNT(*) and COUNT(column)
OTHERWISE FULL --> The data type/semantics of partial aggregation data is different than
original data and full aggregation data.
E.g. AVG uses a STRUCT with count and sum for partial aggregation data. It divides
sum by count to produce the average for final aggregation.
- See Also:
- Serialized Form