private static void setCallParameter(HplsqlParser.Expr_func_paramsContext actual, HashMap<String, Var> out, Exec exec,
      HplsqlParser.ExprContext a, HplsqlParser.Create_routine_param_itemContext p, Var value) {
    String name = p.ident().getText();
    String type = p.dtype().getText();
    String len = null;
    String scale = null;
    if (p.dtype_len() != null) {
      len = p.dtype_len().L_INT(0).getText();
      if (p.dtype_len().L_INT(1) != null) {
        scale = p.dtype_len().L_INT(1).getText();
      }
    }
    Var variable = setCallParameter(name, type, len, scale, value, exec);
    exec.trace(actual, "SET PARAM " + name + " = " + variable.toString());
    if (out != null && a.expr_atom() != null && a.expr_atom()
        .qident() != null && (p.T_OUT() != null || p.T_INOUT() != null)) {
      String actualName = a.expr_atom().qident().getText();
      if (actualName != null) {
        out.put(actualName, variable);
      }
    }
  }
Set parameters for user-defined function call
hplsql/src/main/java/org/apache/hive/hplsql/functions/InMemoryFunctionRegistry.java