You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "xuzifu666 (via GitHub)" <gi...@apache.org> on 2023/03/10 02:57:07 UTC

[GitHub] [hudi] xuzifu666 commented on pull request #8133: [HUDI-5904] support more than one update actions in merge into table

xuzifu666 commented on PR #8133:
URL: https://github.com/apache/hudi/pull/8133#issuecomment-1463177403

   > Will cause data quality problems if we only remove the check, if source table without precombineField, look like hudi will add the first updateAction assignments vlaue expre which key is target precombineField to source df, because we need dedup before use payload And need add more test: cow/mor
   > 
   > * different updateAction with diff precombine field expr
   > * source table without precombineField (like target.precombineField = source.otherfield)
   >   a simple test like this:
   > 
   > ```sql
   > merge into $cowTableName t0
   > using (
   >   select 1 as id, 'a1_n_6' as name, 6 as price, 1010 as v_ts, '1' as flag union
   >   select 2 as id, 'a2_n_6' as name, 6 as price, 1010 as v_ts, '2' as flag union
   >   select 6 as id, 'a3_n_6' as name, 6 as price, 1010 as v_ts, '1' as flag
   >   ) s0
   >    on s0.id = t0.id
   >    when matched and flag = '1' then update set
   >    id = s0.id, name = s0.name, ts = 1003
   >    when matched and flag = '2' then update set
   >    id = s0.id, price = s0.price, ts = s0.v_ts + 2
   >    when not matched and flag = '1' then insert *
   > ```
   
   yes,but mostly business is upsert only one record. i thought this is not impact bussiness in one record upsert


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org