private Var evaluate(ParseTree tree, String execMain) {
    if (tree == null) {
      return null;
    }
    if (execMain != null) {
      initRoutines = true;
      visit(tree);
      initRoutines = false;
      exec.functions.exec(execMain.toUpperCase(), null);
    }
    else {
      visit(tree);
    }
    if (!exec.stack.isEmpty()) {
      return exec.stackPop();
    }
    return null;
  }
Set SQL_NO_DATA as the result of SQL execution
hplsql/src/main/java/org/apache/hive/hplsql/Exec.java