Description
In HiveClientImpl there is a method to create database:
override def createDatabase( database: CatalogDatabase, ignoreIfExists: Boolean): Unit = withHiveState { client.createDatabase( new HiveDatabase( database.name, database.description, database.locationUri, database.properties.asJava), ignoreIfExists) }
The problem is that it assumes that database.properties is a not null value which is not always the truth. In fact, when the database is created, in HiveMetaStore we have:
private void createDefaultDB_core(RawStore ms) throws MetaException, InvalidObjectException { try { ms.getDatabase(DEFAULT_DATABASE_NAME); } catch (NoSuchObjectException e) { Database db = new Database(DEFAULT_DATABASE_NAME, DEFAULT_DATABASE_COMMENT, wh.getDefaultDatabasePath(DEFAULT_DATABASE_NAME).toString(), null); db.setOwnerName(PUBLIC); db.setOwnerType(PrincipalType.ROLE); ms.createDatabase(db); } }
As you can see, parameters field is set to null.