Package nz.org.riskscape.engine.rl.agg
Class AggregateExpressionRealizer
java.lang.Object
nz.org.riskscape.engine.rl.agg.AggregateExpressionRealizer
Does all the work for DefaultExpressionRealizer.realizeAggregate(Type, Expression)
-
Constructor Summary
ConstructorsConstructorDescriptionAggregateExpressionRealizer(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.engine.types.Type inputType, nz.org.riskscape.rl.ast.Expression root) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetImplicitName(nz.org.riskscape.rl.ast.FunctionCall aggregateFunctionCall, Collection<String> used) Returns an identifier for use in an aggregate struct expression for the given aggregation function call, where the user hasn't specified one.nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.rl.agg.RealizedAggregateExpression>realize()
-
Constructor Details
-
AggregateExpressionRealizer
public AggregateExpressionRealizer(nz.org.riskscape.engine.rl.RealizationContext context, nz.org.riskscape.engine.types.Type inputType, nz.org.riskscape.rl.ast.Expression root)
-
-
Method Details
-
getImplicitName
public static String getImplicitName(nz.org.riskscape.rl.ast.FunctionCall aggregateFunctionCall, Collection<String> used) Returns an identifier for use in an aggregate struct expression for the given aggregation function call, where the user hasn't specified one.
Note this is a simpler routine than that adopted for scalar expressions
ExpressionRealizer.getImplicitName(RealizationContext, RealizedExpression, Collection)as aRealizedAggregateExpressiondoes not expose as much 'structure' via its API (compared to aRealizedExpression. Given how realization for aggregate expressions is currently implemented, it doesn't really matter in practice and decent names are given in most situations that agree with the names that scalar struct expressions would be given. -
realize
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.rl.agg.RealizedAggregateExpression> realize()
-