spark: wire DRC createTable#6673
Draft
TimothyW553 wants to merge 5 commits into
Draft
Conversation
This was referenced Apr 25, 2026
320b463 to
2df9bb0
Compare
f38f01b to
22e0c54
Compare
This was referenced Apr 26, 2026
4bbc9a7 to
f266794
Compare
303f5bd to
fbe7989
Compare
This was referenced May 12, 2026
7597846 to
439c03f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🥞 Stacked PR
Use this link to review incremental changes.
Which Delta project/connector is this regarding?
Spark / Unity Catalog Delta REST Catalog.
Description
This wires Delta REST Catalog managed
CREATE TABLEinto the Spark Delta catalog path.Flow:
prepareCreateTablecalls the UC DRC staging API for eligible managed creates and gets the UC-managed table location plus required Delta properties.createTableruns after the commit and finalizes the UC table using the committedSnapshotmetadata: schema, partition columns, protocol, table properties, and location.This PR only intercepts managed CREATE shapes without an explicit user location. External create support is added in the next stack PR. Existing paths stay unchanged because the DRC path is gated on Unity Catalog, DRC being enabled and supported, no existing table, a create operation, and
prepareCreateTablereturningSome.CreateDeltaTableCommand.createTableFuncnow receives(CatalogTable, Snapshot)so the DRC finalization step can use the post-commit Delta metadata instead of pre-commit table input.How was this patch tested?
Added Spark catalog and schema-converter coverage for the managed create flow, including staging success, unsupported create shapes, disabled/unavailable DRC, staging errors, table-id mismatch, safety-net create failure, createTable request body/namespace assertions, protocol feature ordering, property filtering, and Spark-to-DRC schema conversion.
Ran:
build/sbt 'spark/testOnly org.apache.spark.sql.delta.catalog.DeltaCatalogClientSuite org.apache.spark.sql.delta.catalog.DeltaRestSchemaConverterSuite'Result: 23 tests passed.
Does this PR introduce any user-facing changes?
No released-version user-facing change. This adds internal plumbing for DRC-backed managed table creation when the experimental catalog option is enabled.