[ 
https://issues.apache.org/jira/browse/SPARK-56472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wenchen Fan resolved SPARK-56472.
---------------------------------
    Fix Version/s: 4.2.0
       Resolution: Fixed

Issue resolved by pull request 55340
[https://github.com/apache/spark/pull/55340]

> Fix MERGE schema evolution with WHEN MATCHED THEN DELETE
> --------------------------------------------------------
>
>                 Key: SPARK-56472
>                 URL: https://issues.apache.org/jira/browse/SPARK-56472
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 4.2.0
>            Reporter: Johan Lasperas
>            Assignee: Johan Lasperas
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.2.0
>
>
> The following MERGE INTO statement doesn't correctly trigger schema evolution:
>  
> {code:java}
> MERGE INTO target
> USING source
> ON target.id = source.id
> WHEN MATCHED THEN DELETE
> WHEN NOT MATCHED THEN INSERT SET *; {code}
>  
> This is because 
> [schemaEvolutionReady|https://github.com/apache/spark/blob/e7229c7b4bd8da80a8a159d7db43ad24bdc7e538/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/v2Commands.scala#L1064]
>  always returns false when there's a DELETE clause



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to