baifachuan opened a new pull request #2987:
URL: https://github.com/apache/hive/pull/2987


   ### What changes were proposed in this pull request?
   
   modify the FileUtils.checkDeletePermission function add this check:
   
   ` 
   if(path.getParent() == null) {
     // no file/dir to be deleted, because of the path is root dir, hive table 
forbid set the location to root dir.
     return;
   }
   `
   If the path.getParent() we can be sure the location is ROOT path. no 
file/dir to be deleted
   
   
   ### Why are the changes needed?
   If I create an external table using the ROOT path, the table was created 
successfully, but when I drop the table throw the NPE.  So I can't drop the 
table forever.
   
   This is not a good phenomenon.
   
   ### Does this PR introduce _any_ user-facing change?
   no
   
   
   ### How was this patch tested?
   mvn test -Dtest=SomeTest --pl common
   


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