vihangk1 commented on code in PR #3561:
URL: https://github.com/apache/hive/pull/3561#discussion_r962171621


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -4293,7 +4293,7 @@ private void deleteOldPathForReplace(Path destPath, Path 
oldPath, HiveConf conf,
       // But not sure why we changed not to delete the oldPath in HIVE-8750 if 
it is
       // not the destf or its subdir?
       isOldPathUnderDestf = isSubDir(oldPath, destPath, oldFs, destFs, false);
-      if (isOldPathUnderDestf) {
+      if (isOldPathUnderDestf && oldFs.exists(oldPath)) {
         cleanUpOneDirectoryForReplace(oldPath, oldFs, pathFilter, conf, purge, 
isNeedRecycle);

Review Comment:
   Your comment makes sense to me. I think that is a valid way to handle this 
as well. But since this is a backport, if we want to do this we should do it in 
a separate PR in master branch first to avoid git conflicts in future.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to