for(LogicalExpression e : call){
if(AggregateChecker.isAggregating(e)) includesAggregates = true;
if(!ConstantChecker.onlyIncludesConstants(e)) onlyConstants = false;
evals.add(e.accept(this, null));
}
FunctionArguments args = new FunctionArguments(onlyConstants, includesAggregates, evals, call);
if(call.getDefinition().isAggregating()){
if(args.includesAggregates()) throw new SetupException(String.format("The call for %s contains one or more arguments that also contain aggregating functions. An aggregating function cannot contain aggregating expressions.", call.getDefinition()));
BasicEvaluator e = FunctionEvaluatorRegistry.getEvaluator(call.getDefinition().getName(), args, record);
if(!(e instanceof AggregatingEvaluator ) ){
throw new SetupException(String.format("Function %s is an aggregating function. However, the provided evaluator (%s) is not an aggregating evaluator.", call.getDefinition(), e.getClass()));
}