Skip to content

Commit 79a0581

Browse files
authored
fix Delta UniversalFormat bug so it supports overwrite table (#2852)
<!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, please read our contributor guidelines: https://github.com/delta-io/delta/blob/master/CONTRIBUTING.md 2. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP] Your PR title ...'. 3. Be sure to keep the PR description updated to reflect all changes. 4. Please write your PR title to summarize what this PR proposes. 5. If possible, provide a concise example to reproduce the issue for a faster review. 6. If applicable, include the corresponding issue number in the PR title and link it in the body. --> #### Which Delta project/connector is this regarding? <!-- Please add the component selected below to the beginning of the pull request title For example: [Spark] Title of my pull request --> - [x] Spark - [ ] Standalone - [ ] Flink - [ ] Kernel - [ ] Other (fill in here) ## Description fix Delta UniversalFormat bug so it supports overwrite table. It should use a full metadata for later detection logic. ## How was this patch tested? manual test with dataframe overwrite.
1 parent afa0e39 commit 79a0581

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spark/src/main/scala/org/apache/spark/sql/delta/UniversalFormat.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ object UniversalFormat extends DeltaLogging {
208208
def enforceDependenciesInConfiguration(
209209
configuration: Map[String, String],
210210
snapshot: Snapshot): Map[String, String] = {
211-
var metadata = Metadata(configuration = configuration)
211+
var metadata = snapshot.metadata.copy(configuration = configuration)
212212

213213
// Check UniversalFormat related property dependencies
214214
val (_, universalMetadata) = UniversalFormat.enforceInvariantsAndDependencies(

0 commit comments

Comments
 (0)