Skip to content

[SPARK-56472] Fix MERGE schema evolution with WHEN MATCHED THEN DELETE#55340

Open
johanl-db wants to merge 1 commit intoapache:masterfrom
johanl-db:SPARK-56472-merge-schema-evolution-matched-delete
Open

[SPARK-56472] Fix MERGE schema evolution with WHEN MATCHED THEN DELETE#55340
johanl-db wants to merge 1 commit intoapache:masterfrom
johanl-db:SPARK-56472-merge-schema-evolution-matched-delete

Conversation

@johanl-db
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Fixes a small bug in MERGE INTO schema evolution so that MERGE statements that contain a DELETE clause correctly trigger schema evolution:

MERGE INTO target
USING source
ON target.id = source.id
WHEN MATCHED THEN DELETE
WHEN NOT MATCHED THEN INSERT SET *; 

How was this patch tested?

Added a test, confirmed that the test fails without this fix.

"`bonus` cannot be resolved"
)

testEvolution("source has extra column with delete action")(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! how about just DELETE, will it trigger?

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.

2 participants