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

Udit Mehrotra updated HUDI-2139:
--------------------------------
    Status: In Progress  (was: Open)

> MergeInto MOR Table May Result InCorrect Result
> -----------------------------------------------
>
>                 Key: HUDI-2139
>                 URL: https://issues.apache.org/jira/browse/HUDI-2139
>             Project: Apache Hudi
>          Issue Type: Bug
>          Components: Spark Integration
>            Reporter: pengzhiwei
>            Assignee: pengzhiwei
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> Currently we process all the update-action and inert-action in the 
> ExpressionPayload#
> getInsertValue without know whether the record is matched or not matched for 
> MOR table. This may result in incorrect merge result. e.g.
> {code:java}
> Merge into h0
> using (select 2 as id, 'a1' as name, 10 as price from s) s0
> on h0.id = s0.id
> when matched then s0.id = 1 the update set id = s0.id, name = s0.name, price 
> = 10
> when not matched then s0.id = 2 the insert (id,name,price) values(id,name, 
> 20){code}
> If the id = 2 can matched the target table h0,  but it cannot match the 
> udpate-condition ( s0.id = 1),  It should not update the table. However, 
> currently we cannot know the matched state of the input record, it will goes 
> to the not-matched actions and update the price to 20 finally. This is 
> incorrect.



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

Reply via email to