You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "xy (Jira)" <ji...@apache.org> on 2023/03/16 03:16:00 UTC

[jira] [Commented] (HUDI-5904) support more than one update actions in merge into table

    [ https://issues.apache.org/jira/browse/HUDI-5904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17700949#comment-17700949 ] 

xy commented on HUDI-5904:
--------------------------

master commit:f51a45589d72a12c4e894e17bb90a56bca44fca6

> support more than one update actions in merge into table
> --------------------------------------------------------
>
>                 Key: HUDI-5904
>                 URL: https://issues.apache.org/jira/browse/HUDI-5904
>             Project: Apache Hudi
>          Issue Type: Bug
>          Components: spark-sql
>    Affects Versions: 0.12.1, 0.12.2, 0.13.0
>            Reporter: xy
>            Assignee: xy
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.13.1
>
>
> spark.sql(
> s"""
> |merge into hudi_cow_pt_tbl as target
> |using (
> | select id, name, data, country, ts from inc_table
> |) source
> |on source.id = target.id
> |when matched and source.data > target.data then
> |update set target.data = source.data, target.ts = source.ts
> |when matched and source.data = 6 then
> |update set target.data = source.data, target.ts = source.ts
> |when not matched then
> |insert *
> |""".stripMargin)
>  
> when we execute sql above,would forbidden.But most business need more than once update action in actual 



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