You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2023/09/01 01:44:14 UTC
[GitHub] [hudi] danny0405 commented on a diff in pull request #9592: automatically create a database when using the flink catalog dfs mode
danny0405 commented on code in PR #9592:
URL: https://github.com/apache/hudi/pull/9592#discussion_r1312444984
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/catalog/HoodieCatalog.java:
##########
@@ -125,6 +125,16 @@ public void open() throws CatalogException {
} catch (IOException e) {
throw new CatalogException(String.format("Checking catalog path %s exists exception.", catalogPathStr), e);
}
+
+ if (!databaseExists(getDefaultDatabase())) {
+ LOG.info("Creating database {} automatically because it does not exist.", getDefaultDatabase());
+ Path dbPath = new Path(catalogPath, getDefaultDatabase());
Review Comment:
Can we write a test case for it in `TestHoodieCatalog`.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org