Skip to content

Commit

Permalink
fix Delta UniversalFormat bug so it supports overwrite table (#2852)
Browse files Browse the repository at this point in the history
<!--
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.
  • Loading branch information
lzlfred committed Apr 8, 2024
1 parent afa0e39 commit 79a0581
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ object UniversalFormat extends DeltaLogging {
def enforceDependenciesInConfiguration(
configuration: Map[String, String],
snapshot: Snapshot): Map[String, String] = {
var metadata = Metadata(configuration = configuration)
var metadata = snapshot.metadata.copy(configuration = configuration)

// Check UniversalFormat related property dependencies
val (_, universalMetadata) = UniversalFormat.enforceInvariantsAndDependencies(
Expand Down

0 comments on commit 79a0581

Please sign in to comment.