nrg4878 commented on a change in pull request #2638:
URL: https://github.com/apache/hive/pull/2638#discussion_r713419101



##########
File path: 
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java
##########
@@ -355,7 +355,11 @@ public Path getDefaultTablePath(Database db, String 
tableName, boolean isExterna
     Path dbPath = null;
     if (isExternal) {
       dbPath = new Path(db.getLocationUri());
-      if (FileUtils.isSubdirectory(getWhRoot().toString(), dbPath.toString() + 
Path.SEPARATOR)) {
+      Path dbLocation = Path.getPathWithoutSchemeAndAuthority(dbPath);

Review comment:
       This is a common API thats used by other areas of the code in Hive. I am 
concerned that doing a scheme-less path comparison might cause issues.
   dbPath is the location set on the Database object which has the scheme. for 
ex: s3 or hdfs.
   if we do a scheme-less comparison, s3://user/warehouse/hive/mydb.db/mytable 
will be considered a managed location if the warehouse root is set to 
"hdfs://user/warehouse/hive". 
   Do you see a downside with just toString comparison?
   




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