Oliver Schiller created HIVE-27348: -------------------------------------- Summary: Database name is not encoded when using for default database location Key: HIVE-27348 URL: https://issues.apache.org/jira/browse/HIVE-27348 Project: Hive Issue Type: Bug Components: Hive, Metastore, Standalone Metastore Reporter: Oliver Schiller
The database directory is created using the following code in Warehouse.java: {code:java} private String dbDirFromDbName(Database db) throwsMetaException { return db.getName().toLowerCase() +DATABASE_WAREHOUSE_SUFFIX; }{code} The database name is not encoded, as done when generating directories for table names. As a consequence, special characters in schema names yield problems, e.g., when a schema having name "my:schema" is created: {code:java} metastore.RetryingHMSHandler: MetaException(message:java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: my:schema.db) at org.apache.hadoop.hive.metastore.ExceptionHandler.newMetaException(ExceptionHandler.java:152) at org.apache.hadoop.hive.metastore.ExceptionHandler.defaultMetaException(ExceptionHandler.java:168) at org.apache.hadoop.hive.metastore.HMSHandler.create_database(HMSHandler.java:1397){code} -- This message was sent by Atlassian Jira (v8.20.10#820010)