private void callWithParameters(HplsqlParser.Expr_func_paramsContext ctx, ParserRuleContext procCtx, HashMap<String, Var> out, ArrayList<Var> actualParams) {
    if (procCtx instanceof HplsqlParser.Create_function_stmtContext) {
      HplsqlParser.Create_function_stmtContext func = (HplsqlParser.Create_function_stmtContext) procCtx;
      setCallParameters(func.ident().getText(), ctx, actualParams, func.create_routine_params(), null, exec);
      if (func.declare_block_inplace() != null)
        exec.visit(func.declare_block_inplace());
      exec.visit(func.single_block_stmt());
    } else {
      HplsqlParser.Create_procedure_stmtContext proc = (HplsqlParser.Create_procedure_stmtContext) procCtx;
      setCallParameters(proc.ident(0).getText(), ctx, actualParams, proc.create_routine_params(), out, exec);
      exec.visit(proc.proc_block());
    }
  }
Execute a stored procedure using CALL or EXEC statement passing parameters
hplsql/src/main/java/org/apache/hive/hplsql/functions/HmsFunctionRegistry.java