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


##########
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:
   @ayushtkn Will you be able to approve this PR since you have already looked 
into this? I can create a follow-up PR which incorporates you feedback on 
master branch if you want.



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