private Path getDestinationFilePath(QB qb, final String destinationFile, boolean isMmTable) {
    if (this.isResultsCacheEnabled() && this.queryTypeCanUseCache(qb)) {
      assert (!isMmTable);
      QueryResultsCache instance = QueryResultsCache.getInstance();
      // QueryResultsCache should have been initialized by now
      if (instance != null) {
        Path resultCacheTopDir = instance.getCacheDirPath();
        String dirName = UUID.randomUUID().toString();
        Path resultDir = new Path(resultCacheTopDir, dirName);
        this.ctx.setFsResultCacheDirs(resultDir);
        return resultDir;
      }
    }
    return new Path(destinationFile);
  }
@param totalFiles
         the totalFiles to set
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java