Skip to content

fix(glue): Support create_table_transaction for S3 Tables federated databases#3210

Open
jamesbornholt wants to merge 1 commit intoapache:mainfrom
jamesbornholt:fix-glue-create-table-transaction-s3tables
Open

fix(glue): Support create_table_transaction for S3 Tables federated databases#3210
jamesbornholt wants to merge 1 commit intoapache:mainfrom
jamesbornholt:fix-glue-create-table-transaction-s3tables

Conversation

@jamesbornholt
Copy link
Copy Markdown
Contributor

Rationale for this change

For S3 Tables, the warehouse location is managed by S3 Tables and only available after a Glue table entry is created. create_table() already handled this via _create_table_s3tables(), but create_table_transaction() went through the base class path which failed with 'No default path is set'.

This adds a create_table_transaction() override on GlueCatalog that, for S3 Tables federated databases:

  1. Pre-creates a minimal Glue table entry so S3 Tables allocates storage
  2. Retrieves the managed location from the Glue table
  3. Builds the staged table targeting that managed location
  4. Returns an _S3TablesCreateTableTransaction that cleans up the staging table on abort/failure

Also refactors commit_table() to handle the case where a Glue table exists but has no metadata_location yet (the staging table case), branching on current_glue_table instead of current_table for the update-vs-create decision.

Are these changes tested?

Yes, new unit tests for this path, and I've also tested against the service directly.

Are there any user-facing changes?

No, this just fixes a code path that is currently failing.

…atabases

For S3 Tables, the warehouse location is managed by S3 Tables and only
available after a Glue table entry is created. create_table() already
handled this via _create_table_s3tables(), but create_table_transaction()
went through the base class path which failed with 'No default path is
set'.

This adds a create_table_transaction() override on GlueCatalog that, for
S3 Tables federated databases:
  1. Pre-creates a minimal Glue table entry so S3 Tables allocates storage
  2. Retrieves the managed location from the Glue table
  3. Builds the staged table targeting that managed location
  4. Returns an _S3TablesCreateTableTransaction that cleans up the
     staging table on abort/failure

Also refactors commit_table() to handle the case where a Glue table
exists but has no metadata_location yet (the staging table case),
branching on current_glue_table instead of current_table for the
update-vs-create decision.
@jamesbornholt jamesbornholt force-pushed the fix-glue-create-table-transaction-s3tables branch from 1be0018 to 5e105ad Compare March 30, 2026 22:45
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