Search in sources :

Example 1 with MinAggregator

use of org.apache.phoenix.expression.aggregator.MinAggregator in project phoenix by apache.

the class MinAggregateFunction method newServerAggregator.

@Override
public Aggregator newServerAggregator(Configuration conf) {
    Expression child = getAggregatorExpression();
    final PDataType type = child.getDataType();
    final Integer maxLength = child.getMaxLength();
    return new MinAggregator(child.getSortOrder()) {

        @Override
        public PDataType getDataType() {
            return type;
        }

        @Override
        public Integer getMaxLength() {
            return maxLength;
        }
    };
}
Also used : MinAggregator(org.apache.phoenix.expression.aggregator.MinAggregator) PDataType(org.apache.phoenix.schema.types.PDataType) Expression(org.apache.phoenix.expression.Expression)

Aggregations

Expression (org.apache.phoenix.expression.Expression)1 MinAggregator (org.apache.phoenix.expression.aggregator.MinAggregator)1 PDataType (org.apache.phoenix.schema.types.PDataType)1