Skip to content

[SPARK-39078][SQL] Fix a bug in UPDATE commands with DEFAULT values#36514

Closed
dtenedor wants to merge 2 commits intoapache:masterfrom
dtenedor:default-update-fix-bug
Closed

[SPARK-39078][SQL] Fix a bug in UPDATE commands with DEFAULT values#36514
dtenedor wants to merge 2 commits intoapache:masterfrom
dtenedor:default-update-fix-bug

Conversation

@dtenedor
Copy link
Contributor

What changes were proposed in this pull request?

Fix a bug in UPDATE commands with DEFAULT values.

Specifically, the previous implementation of the mapStructFieldNamesToExpressions method associated column names with default values in the order of the keys in Map[String, StructField]. Since that's not always true, this PR updates that method to consume these columns in the order they actually appear in the target table schema instead.

Why are the changes needed?

The bug is fixed with this PR.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

An extra test exercises an error case that failed before, but is now fixed.

@github-actions github-actions bot added the SQL label May 12, 2022
@gengliangwang
Copy link
Member

Thanks, merging to master

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments