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

Yixue Zhu updated HUDI-631:
---------------------------
    Description: 
The usage of utility function 
https://github.com/apache/hudi/blob/6a0aa9a645d11ed7b50e18aa0563dafcd9d145f7/hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java#L258
 does not handle schema evolution such as optional fields removal (from new 
schema).

There are example usage cases: 
A typical schema evolution like changing a field type would require one to add 
a new field with new type, then once old data no longer is no longer used, or 
new field is backfilled, old field can be dropped.
Or 
A field which is no longer needed.

The schema evolution check, which was implemented in HUDI-741, would hinder 
this kind of usage.

  was:
The utility function 
[HoodieAvroUtils.rewrite|https://github.com/apache/incubator-hudi/blob/5b7bb142dc6712c41fd8ada208ab3186369431f9/hudi-common/src/main/java/org/apache/hudi/common/util/HoodieAvroUtils.java#L205]
 does not handle schema evolution such as optional fields removal (from new 
schema).

The schema evolution check was implemented in HUDI-741.


> HoodieAvroUtils.rewrite does not handle schema change such as optional fields 
> removal
> -------------------------------------------------------------------------------------
>
>                 Key: HUDI-631
>                 URL: https://issues.apache.org/jira/browse/HUDI-631
>             Project: Apache Hudi
>          Issue Type: Bug
>          Components: Common Core
>            Reporter: Yixue Zhu
>            Priority: Major
>
> The usage of utility function 
> https://github.com/apache/hudi/blob/6a0aa9a645d11ed7b50e18aa0563dafcd9d145f7/hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java#L258
>  does not handle schema evolution such as optional fields removal (from new 
> schema).
> There are example usage cases: 
> A typical schema evolution like changing a field type would require one to 
> add a new field with new type, then once old data no longer is no longer 
> used, or new field is backfilled, old field can be dropped.
> Or 
> A field which is no longer needed.
> The schema evolution check, which was implemented in HUDI-741, would hinder 
> this kind of usage.



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

Reply via email to