public void addReturnCursor(Var var) {
    String routine = callStackPeek();
    ArrayList<Var> cursors = returnCursors.computeIfAbsent(routine, k -> new ArrayList<>());
    cursors.add(var);
  }
Add a return cursor visible to procedure callers and clients
hplsql/src/main/java/org/apache/hive/hplsql/Exec.java