You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2020/06/29 13:18:00 UTC

[jira] [Resolved] (SPARK-32127) Check rules for MERGE INTO should use MergeAction.condition other than MergeAction.children

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

Wenchen Fan resolved SPARK-32127.
---------------------------------
    Fix Version/s: 3.1.0
                   3.0.1
       Resolution: Fixed

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

> Check rules for MERGE INTO should use MergeAction.condition other than MergeAction.children
> -------------------------------------------------------------------------------------------
>
>                 Key: SPARK-32127
>                 URL: https://issues.apache.org/jira/browse/SPARK-32127
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Xianyin Xin
>            Assignee: Xianyin Xin
>            Priority: Major
>             Fix For: 3.0.1, 3.1.0
>
>
> [SPARK-30924|https://issues.apache.org/jira/browse/SPARK-30924] adds some check rules for MERGE INTO one of which ensures the first MATCHED clause must have a condition. However, it uses {{MergeAction.children}} in the checking which is not accurate for the case, and it lets the below case pass the check:
> {code:scala}
> MERGE INTO testcat1.ns1.ns2.tbl AS target
> xxx
> WHEN MATCHED THEN UPDATE SET target.col2 = source.col2
> WHEN MATCHED THEN DELETE
> xxx
> {code}
> We should use {{MergeAction.condition}} instead.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org