} else if (setFunctionType.AVG() != null) {
aggr = new AvgAggregated(innerNc);
} else {
checkNotNull(setFunctionType.COUNT());
if (isDistinct) {
aggr = new CountDistinctAggregated(innerNc);
} else {
aggr = new CountAggregated(innerNc);
}
}
raBuilder.registerAggregation(aggr);