[
https://issues.apache.org/jira/browse/HUDI-6483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jonathan Vexler updated HUDI-6483:
----------------------------------
Status: In Progress (was: Open)
> MERGE INTO should support schema evolution for partial updates.
> ---------------------------------------------------------------
>
> Key: HUDI-6483
> URL: https://issues.apache.org/jira/browse/HUDI-6483
> Project: Apache Hudi
> Issue Type: Improvement
> Components: spark-sql
> Reporter: Aditya Goenka
> Assignee: Jonathan Vexler
> Priority: Blocker
> Fix For: 0.16.0, 1.1.0
>
>
> Following code is example for doing MERGE INTO along with schema evolution
> which is not yet supported by hudi. Currently, Hudi tries to use target table
> schema during MERGE INTO.
> Following code should be supported -
> ```
> create table test_insert3 (
> id int,
> name string,
> updated_at timestamp
> ) using hudi
> options (
> type = 'cow',
> primaryKey = 'id',
> preCombineField = 'updated_at'
> ) location 'file:///tmp/test_insert3';
> merge into test_insert3 as target
> using (
> select 1 as id, 'c' as name, 1 as new_col, current_timestamp as updated_at
> ) source
> on target.id = source.id
> when matched then update set target.new_col = source.new_col
> when not matched then insert *;
> ```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)