yihua opened a new issue, #20829: URL: https://github.com/apache/hudi/issues/20829
Since Spark 3.4, `MERGE INTO` accepts `WHEN NOT MATCHED BY SOURCE THEN DELETE | UPDATE`. On a Hudi table these clauses are silently ignored: neither the Spark plan utils nor `MergeIntoHoodieTableCommand` read `MergeIntoTable.notMatchedBySourceActions`, so the statement runs as if the clause were absent and the target rows it should delete or update stay as they are. ```sql merge into t using s on t.id = s.id when matched then update set * when not matched by source then delete ``` succeeds and deletes nothing. Applying the clause needs the target rows that no source row matches, which the command does not read for a table with a record key. Until that is supported, I'd propose failing the analysis with a clear message instead of ignoring the clause. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
