Skip to content

Feature/spark disable create table in default db - #9549

Open
junmuz wants to merge 2 commits into
apache:masterfrom
junmuz:feature/spark-disable-create-table-in-default-db
Open

Feature/spark disable create table in default db#9549
junmuz wants to merge 2 commits into
apache:masterfrom
junmuz:feature/spark-disable-create-table-in-default-db

Conversation

@junmuz

@junmuz junmuz commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Purpose

  • Add a new SparkCatalog option disable-create-table-in-default-db (default false) that, when enabled, prevents the default database from being auto-created during catalog initialization and blocks CREATE TABLE statements targeting the default database. This is similar to FlinkCatalogOption
  • Works with both the standard default database and custom default databases configured via defaultDatabase

Tests

  • testDisableCreateTableInDefaultDb — verifies CREATE TABLE in default is rejected; creating databases and tables in non-default namespaces still works; inserted data is readable
  • testDisableCreateTableWithCustomDefaultDb — verifies the guard works when defaultDatabase is set to a custom value
  • testDefaultDatabaseNotCreatedWhenDisabled — verifies the default database is not auto-created during catalog initialization

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.

1 participant