@Override
    public Boolean visitCall(CallExpression call, Void context) {
      Signature signature = call.getSignature();
      if (registry.isRegistered(signature)
          && !registry.getScalarFunctionImplementation(signature).isDeterministic()) {
        return false;
      }

      return call.getArguments().stream().allMatch(expression -> expression.accept(this, context));
    }
Example #2
0
  protected void parseParamStrings(String paramString, ExpressionFactory expressionFactory) {
    List paramStrings = Util.tokenizeIgnoringEnclosers(paramString, ',');
    for (Iterator itr = paramStrings.iterator(); itr.hasNext(); ) {
      String nextParam = ((String) itr.next()).trim();
      if (!(nextParam.equals(""))) {
        Debug.logn("Find match for param " + nextParam, this);
        if (CallExpression.isVariable(this.context, nextParam)) {
          DNVariable v = CallExpression.getVariable(this.context, nextParam);
          parameters.add(v);
        } else if (expressionFactory.getExpression(nextParam, this.context) != null) {

          parameters.add(expressionFactory.getExpression(nextParam, this.context));
        }
      }
    }
  }