public abstract class AvgAggFunction extends DeclarativeAggregateFunction
Modifier and Type | Class and Description |
---|---|
static class |
AvgAggFunction.ByteAvgAggFunction
Built-in Byte Avg aggregate function.
|
static class |
AvgAggFunction.DecimalAvgAggFunction
Built-in Decimal Avg aggregate function.
|
static class |
AvgAggFunction.DoubleAvgAggFunction
Built-in Double Avg aggregate function.
|
static class |
AvgAggFunction.FloatAvgAggFunction
Built-in Float Avg aggregate function.
|
static class |
AvgAggFunction.IntAvgAggFunction
Built-in Integer Avg aggregate function.
|
static class |
AvgAggFunction.LongAvgAggFunction
Built-in Long Avg aggregate function.
|
static class |
AvgAggFunction.ShortAvgAggFunction
Built-in Short Avg aggregate function.
|
Constructor and Description |
---|
AvgAggFunction() |
Modifier and Type | Method and Description |
---|---|
Expression[] |
accumulateExpressions()
Expressions for accumulating the mutable aggregation buffer based on an input row.
|
protected UnresolvedCallExpression |
adjustedMinus(UnresolvedReferenceExpression arg1,
UnresolvedReferenceExpression arg2) |
protected UnresolvedCallExpression |
adjustedPlus(UnresolvedReferenceExpression arg1,
UnresolvedReferenceExpression arg2) |
UnresolvedReferenceExpression[] |
aggBufferAttributes()
All fields of the aggregate buffer.
|
DataType[] |
getAggBufferTypes()
All types of the aggregate buffer.
|
abstract DataType |
getSumType() |
Expression |
getValueExpression()
If all input are nulls, count will be 0 and we will get null after the division.
|
Expression[] |
initialValuesExpressions()
Expressions for initializing empty aggregation buffers.
|
Expression[] |
mergeExpressions()
A sequence of expressions for merging two aggregation buffers together.
|
int |
operandCount()
How many operands your function will deal with.
|
Expression[] |
retractExpressions()
Expressions for retracting the mutable aggregation buffer based on an input row.
|
getKind, getResultType, getTypeInference, mergeOperand, mergeOperands, operand, operands
close, functionIdentifier, open, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRequirements, isDeterministic, supportsConstantFolding
public abstract DataType getSumType()
public int operandCount()
DeclarativeAggregateFunction
operandCount
in class DeclarativeAggregateFunction
public UnresolvedReferenceExpression[] aggBufferAttributes()
DeclarativeAggregateFunction
aggBufferAttributes
in class DeclarativeAggregateFunction
public DataType[] getAggBufferTypes()
DeclarativeAggregateFunction
getAggBufferTypes
in class DeclarativeAggregateFunction
public Expression[] initialValuesExpressions()
DeclarativeAggregateFunction
initialValuesExpressions
in class DeclarativeAggregateFunction
public Expression[] accumulateExpressions()
DeclarativeAggregateFunction
accumulateExpressions
in class DeclarativeAggregateFunction
public Expression[] retractExpressions()
DeclarativeAggregateFunction
retractExpressions
in class DeclarativeAggregateFunction
public Expression[] mergeExpressions()
DeclarativeAggregateFunction
attributeName
and mergeOperand(attributeName)
to refer to the attributes corresponding to each of the buffers
being merged.mergeExpressions
in class DeclarativeAggregateFunction
public Expression getValueExpression()
getValueExpression
in class DeclarativeAggregateFunction
protected UnresolvedCallExpression adjustedPlus(UnresolvedReferenceExpression arg1, UnresolvedReferenceExpression arg2)
protected UnresolvedCallExpression adjustedMinus(UnresolvedReferenceExpression arg1, UnresolvedReferenceExpression arg2)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.