aturoczy commented on code in PR #4329:
URL: https://github.com/apache/hive/pull/4329#discussion_r1195431845
##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java:
##########
@@ -240,15 +240,15 @@ public Path determineDatabasePath(Catalog cat, Database
db) throws MetaException
if (db.getName().equalsIgnoreCase(DEFAULT_DATABASE_NAME)) {
return getWhRootExternal();
} else {
- return new Path(getWhRootExternal(), dbDirFromDbName(db));
+ return new Path(getWhRootExternal(), dbDirFromDbName(db.getName()));
}
} else {
- return new Path(getDnsPath(new Path(cat.getLocationUri())),
dbDirFromDbName(db));
+ return new Path(getDnsPath(new Path(cat.getLocationUri())),
dbDirFromDbName(db.getName()));
}
}
- private String dbDirFromDbName(Database db) throws MetaException {
- return db.getName().toLowerCase() + DATABASE_WAREHOUSE_SUFFIX;
+ private String dbDirFromDbName(final String dbName) {
+ return MetaStoreUtils.encodeTableName(dbName.toLowerCase()) +
DATABASE_WAREHOUSE_SUFFIX;
Review Comment:
Haha you can't imagine! But there were even more pervert characters that I
have seen :D
--
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]