public class SqlMinMaxAggFunction extends SqlAggFunction
MIN and MAX aggregate functions,
returning the returns the smallest/largest of the values which go into it.
There are 3 forms:
Comparable)
Comparable.compareTo(T)
Comparator, Object)
Comparator.compare(T, T) method of the comparator is used
to compare pairs of objects. The comparator is a startup argument, and must
therefore be constant for the duration of the aggregation.
| Modifier and Type | Field and Description |
|---|---|
List<RelDataType> |
argTypes |
static int |
MINMAX_COMPARABLE |
static int |
MINMAX_COMPARATOR |
static int |
MINMAX_INVALID |
static int |
MINMAX_PRIMITIVE |
MDX_PRECEDENCE, NL| Constructor and Description |
|---|
SqlMinMaxAggFunction(List<RelDataType> argTypes,
boolean isMin,
int kind) |
| Modifier and Type | Method and Description |
|---|---|
int |
getMinMaxKind() |
List<RelDataType> |
getParameterTypes(RelDataTypeFactory typeFactory) |
RelDataType |
getReturnType(RelDataTypeFactory typeFactory) |
boolean |
isMin() |
isAggregator, isQuantifierAllowed, validateCallderiveType, getFunctionType, getNameAsId, getParamTypes, getSqlIdentifier, getSyntax, unparse, validateQuantifieracceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isDeterministic, isDynamicFunction, isName, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperandspublic static final int MINMAX_INVALID
public static final int MINMAX_PRIMITIVE
public static final int MINMAX_COMPARABLE
public static final int MINMAX_COMPARATOR
public final List<RelDataType> argTypes
public SqlMinMaxAggFunction(List<RelDataType> argTypes, boolean isMin, int kind)
public boolean isMin()
public int getMinMaxKind()
public List<RelDataType> getParameterTypes(RelDataTypeFactory typeFactory)
public RelDataType getReturnType(RelDataTypeFactory typeFactory)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.