Aggregator agg = aggMap.get(e);
if (agg == null) {
// for aggregation ONLY query
// when there is no record, the empty group by function is still trying to resolve aggregator
return new EvaluationResult(null).withTitle(e.getText());
} else {
return new EvaluationResult(agg.getResult()).withTitle(e.getText());
}
}
}
// fallback with other evaluators
return new EvaluationResult(rowKey.get(name)).withTitle(name);
}
@Override
public Iterable<EvaluationResult> asIterable() {
return transform(rowKey.keySet(), new Function<String, EvaluationResult>(){
@Override
public EvaluationResult apply(String name) {
return new EvaluationResult(rowKey.get(name)).withTitle(name);
}
});
}
@Override