use of io.ordinate.engine.function.aggregate.count.CountDistinctDoubleColumnAggregateFunction in project Mycat2 by MyCATApache.
the class ExecuteCompiler method countDistinct.
public AccumulatorFunction countDistinct(PhysicalPlan input, int index) {
PhysicalPlan peek = input;
Field field = peek.schema().getFields().get(index);
ArrowType outputType = InnerType.castToAggType(field.getType());
switch(InnerType.from(outputType)) {
case INT32_TYPE:
case INT64_TYPE:
return new CountDistinctLongColumnAggregateFunction(index);
case DOUBLE_TYPE:
default:
return new CountDistinctDoubleColumnAggregateFunction(index);
}
}
Aggregations