示例#1
0
  public static FieldValue evaluate(
      Apply apply, List<FieldValue> values, EvaluationContext context) {
    String name = apply.getFunction();

    Function function = getFunction(name);
    if (function == null) {
      DefineFunction defineFunction = context.resolveFunction(name);
      if (defineFunction == null) {
        throw new UnsupportedFeatureException(apply);
      }

      return evaluate(defineFunction, values, context);
    }

    return function.evaluate(values);
  }