public class GenericUDAFAverage extends AbstractGenericUDAFResolver
| Modifier and Type | Class and Description |
|---|---|
static class |
GenericUDAFAverage.AbstractGenericUDAFAverageEvaluator<TYPE> |
static class |
GenericUDAFAverage.GenericUDAFAverageEvaluatorDecimal |
static class |
GenericUDAFAverage.GenericUDAFAverageEvaluatorDouble |
| Constructor and Description |
|---|
GenericUDAFAverage() |
| Modifier and Type | Method and Description |
|---|---|
static DecimalTypeInfo |
deriveSumFieldTypeInfo(int precision,
int scale)
The intermediate sum field has 10 more integer digits with the same scale.
|
GenericUDAFEvaluator |
getEvaluator(GenericUDAFParameterInfo paramInfo)
Get the evaluator for the parameter types.
|
GenericUDAFEvaluator |
getEvaluator(TypeInfo[] parameters)
Get the evaluator for the parameter types.
|
public GenericUDAFEvaluator getEvaluator(TypeInfo[] parameters) throws SemanticException
GenericUDAFResolverIf the class of the object does not implement Serializable, then we will create a new instance of the class at execution time.
getEvaluator in interface GenericUDAFResolvergetEvaluator in class AbstractGenericUDAFResolverparameters - The types of the parameters. We need the type information to know
which evaluator class to use.SemanticExceptionpublic GenericUDAFEvaluator getEvaluator(GenericUDAFParameterInfo paramInfo) throws SemanticException
GenericUDAFResolver2If the class of the object does not implement Serializable, then we will create a new instance of the class at execution time.
getEvaluator in interface GenericUDAFResolver2getEvaluator in class AbstractGenericUDAFResolverparamInfo - The parameter information that is applicable to the UDAF being
invoked.SemanticExceptionpublic static DecimalTypeInfo deriveSumFieldTypeInfo(int precision, int scale)
precision - scale - Copyright © 2019 The Apache Software Foundation. All Rights Reserved.