GitHub user yoohaemin edited a discussion: (Java/Scala) How do I specify 
deserialize behavior on schema change?

Hi, we are looking into using fury for our new Scala project.

In our project, we need to ensure that the two versions of the application 
(versions right after and right before each other) can always talk to each 
other.

Obviously, when adding a new class, it can't be deserialized in an old version, 
no matter which serialization library we are using, so the deploys will need to 
be in two steps.

However, the modifications of existing classes are trickier. There can be a few 
cases:
- Field added (how to specify default value when serialized payload from old 
version does not contain the field)
- Field made optional (Int -> Option[Int])
- Field removed
- Field type changed, with a mapping function (generalized version of 2nd case)
- Field renamed

These problems can be solved by specifying behaviors to fury on a field: 

- specify a default value on deserialization
- specify a mapping function from a value of different type to the current type
- specify a renaming function


How do I express such changes to Fury, so it can handle these cases?

I will be using compatible mode.
Thanks for reading.

GitHub link: https://github.com/apache/fury/discussions/1848

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to