vineetgarg02 commented on a change in pull request #582: Hive 21386: Extend the 
fetch task enhancement done in HIVE-21279 to make it work with query result 
cache
URL: https://github.com/apache/hive/pull/582#discussion_r271070311
 
 

 ##########
 File path: 
ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java
 ##########
 @@ -555,20 +558,20 @@ public boolean setEntryValid(CacheEntry cacheEntry, 
FetchWork fetchWork) {
           return false;
         }
 
-        if (requiresMove) {
-          // Move the query results to the query cache directory.
-          cachedResultsPath = moveResultsToCacheDirectory(queryResultsPath);
-          dataDirMoved = true;
+        if (requiresCaching) {
+          cacheEntry.cachedResultPaths = new HashSet<>();
+            for(FileStatus fs:fetchWork.getFilesToFetch()) {
+              cacheEntry.cachedResultPaths.add(fs);
+            }
         }
-        LOG.info("Moved query results from {} to {} (size {}) for query '{}'",
 
 Review comment:
   Good point. Will updated the code.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to