public Path getDefaultTablePath(Database db, String tableName, boolean isExternal) throws MetaException {
    Path dbPath = null;
    if (isExternal) {
      dbPath = new Path(db.getLocationUri());
      if (FileUtils.isSubdirectory(getWhRoot().toString(), dbPath.toString()) ||
          getWhRoot().equals(dbPath)) {
        // db metadata incorrect, find new location based on external warehouse root
        dbPath = getDefaultExternalDatabasePath(db.getName());
      }
    } else {
      dbPath = getDatabaseManagedPath(db);
    }
    if (!isExternal && tableName.matches("(.*)" + SOFT_DELETE_TABLE_PATTERN)) {
      String[] groups = tableName.split("\\" + SOFT_DELETE_PATH_SUFFIX);
      tableName = String.join(SOFT_DELETE_PATH_SUFFIX, 
          MetaStoreUtils.encodeTableName(groups[0].toLowerCase()), groups[1]);
    } else {
      tableName = MetaStoreUtils.encodeTableName(tableName.toLowerCase());
    }
    return getDnsPath(new Path(dbPath, tableName));
  }
Returns the default location of the table path using the parent database's location
@param db Database where the table is created
@param tableName table name
@return
@throws MetaException
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java