public FetchWork getFetchWork() {
      // FetchWork's sink is used to hold results, so each query needs a separate copy of FetchWork
      FetchWork fetch = new FetchWork(fetchWork.getTblDir(), fetchWork.getTblDesc(), fetchWork.getLimit());
      fetch.setCachedResult(true);
      fetch.setFilesToFetch(this.cachedResultPaths);
      return fetch;
    }
A class to handle management and lookup of cached Hive query results.
ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java