Class AggregateExpressionRealizer

java.lang.Object
nz.org.riskscape.engine.rl.agg.AggregateExpressionRealizer

public class AggregateExpressionRealizer extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    AggregateExpressionRealizer(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 Type
    Method
    Description
    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.
    nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.rl.agg.RealizedAggregateExpression>
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 a RealizedAggregateExpression does not expose as much 'structure' via its API (compared to a RealizedExpression. 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()