Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flink] Do not create default database if ddl in it is disable #2500

Merged

Conversation

FangYongs
Copy link
Contributor

Purpose

Linked issue: close #2499

If disable-create-table-in-default-db is true, flink catalog should not create default database

Tests

  1. Added test case in FlinkCatalogTest

API and Format

no

Documentation

no

@FangYongs FangYongs force-pushed the 2499_disable_create_default_database branch from 771c414 to caca7ec Compare December 13, 2023 06:50
@FangYongs FangYongs changed the title [flink] Introduce DatabaseFileIOProvider to get fileio for database [flink] Do not create default database if ddl in it is disable Dec 13, 2023
@@ -148,7 +148,7 @@ public FlinkCatalog(
this.logStoreAutoRegister = options.get(LOG_SYSTEM_AUTO_REGISTER);
this.logStoreAutoRegisterTimeout = options.get(REGISTER_TIMEOUT);
this.disableCreateTableInDefaultDatabase = options.get(DISABLE_CREATE_TABLE_IN_DEFAULT_DB);
if (!catalog.databaseExists(defaultDatabase)) {
if (!disableCreateTableInDefaultDatabase && !catalog.databaseExists(defaultDatabase)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe here we can just create default database for FileSystemCatalog?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore me

@FangYongs FangYongs force-pushed the 2499_disable_create_default_database branch from caca7ec to 63d6508 Compare December 13, 2023 07:27
Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi JingsongLi merged commit c4f74c4 into apache:master Dec 13, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Do not create default database if ddl in it is disable
2 participants