use of org.apache.phoenix.expression.aggregator.DistinctValueClientAggregator in project phoenix by apache.
the class DistinctValueAggregateFunction method newClientAggregator.
@Override
public DistinctValueWithCountClientAggregator newClientAggregator() {
PDataType baseType = getAggregatorExpression().getDataType().isArrayType() ? PVarbinary.INSTANCE : getAggregatorExpression().getDataType();
PDataType resultType = PDataType.fromTypeId(baseType.getSqlType() + PDataType.ARRAY_TYPE_BASE);
return new DistinctValueClientAggregator(getAggregatorExpression().getSortOrder(), baseType, resultType);
}
Aggregations