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

Yann Byron updated HUDI-4915:
-----------------------------
    Description: 
Currently, Spark Avro serializer/deserializer has a bug that it will return the 
same object when we call this method twice continuously.  For example:

val row1: InternalRow = ...

val row2: InternalRow = ... // record2 is different with record1

 

val serializeredRecord1 = serialize(row1)

val serializeredRecord2 = serialize(row2)

serializeredRecord1.equals(serializeredRecord2)

 

That is because we use the `val` to declare the serializer/deserializer 
methods, so the latter's result will cover the previous one.

 

 

> Improve Spark Avro SerDe
> ------------------------
>
>                 Key: HUDI-4915
>                 URL: https://issues.apache.org/jira/browse/HUDI-4915
>             Project: Apache Hudi
>          Issue Type: Improvement
>          Components: spark
>            Reporter: Yann Byron
>            Priority: Major
>              Labels: pull-request-available
>
> Currently, Spark Avro serializer/deserializer has a bug that it will return 
> the same object when we call this method twice continuously.  For example:
> val row1: InternalRow = ...
> val row2: InternalRow = ... // record2 is different with record1
>  
> val serializeredRecord1 = serialize(row1)
> val serializeredRecord2 = serialize(row2)
> serializeredRecord1.equals(serializeredRecord2)
>  
> That is because we use the `val` to declare the serializer/deserializer 
> methods, so the latter's result will cover the previous one.
>  
>  



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

Reply via email to