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

[jira] [Updated] (HUDI-5405) Avoid using Projections in generic Merge Into DMLs

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

Yue Zhang updated HUDI-5405:
----------------------------
    Fix Version/s: 0.14.0
                       (was: 0.13.1)

> Avoid using Projections in generic Merge Into DMLs
> --------------------------------------------------
>
>                 Key: HUDI-5405
>                 URL: https://issues.apache.org/jira/browse/HUDI-5405
>             Project: Apache Hudi
>          Issue Type: Bug
>          Components: spark-sql
>    Affects Versions: 0.12.1
>            Reporter: Alexey Kudinkin
>            Priority: Critical
>             Fix For: 0.14.0
>
>
> Currently, `MergeIntoHoodieTableCommand` squarely relies on semantic implemented by `ExpressionPayload` to be able to insert/update records.
> While this is necessary since MIT semantic enables users to do sophisticated and fine-grained updates (for ex, partial updating), this is not necessary in the most generic case:
>  
> {code:java}
> MERGE INTO target
> USING ... source
> ON target.id = source.id
> WHEN MATCHED THEN UPDATE *
> WHEN NOT MATCHED THEN INSERT *{code}
> This is essentially just a SQL way of implementing an upsert – if there are matching records in the table we update them, otherwise – insert.
> In this case there's actually no need to use ExpressionPayload at all, and we can just simply use normal Hudi upserting flow to handle it (avoiding all of the ExpressionPayload overhead)



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