@Override
  public void resetFetch() throws IOException {
    if (driverState.isDestroyed() || driverState.isClosed()) {
      throw new IOException("FAILED: driver has been cancelled, closed or destroyed.");
    }
    if (isFetchingTable()) {
      try {
        driverContext.getFetchTask().resetFetch();
      } catch (Exception e) {
        throw new IOException("Error resetting the current fetch task", e);
      }
    } else {
      context.resetStream();
      driverContext.setResStream(null);
    }
  }
Release some resources after a query is executed while keeping the result around.
ql/src/java/org/apache/hadoop/hive/ql/Driver.java