nastra commented on pull request #3580:
URL: https://github.com/apache/iceberg/pull/3580#issuecomment-975207381


   > Question for my own understanding around `Immutables` and your experience 
with them:
   > 
   > Are there any commonly followed practices for checking in (or not checking 
in) generated code? Is that something people usually vendor or not in your 
experience?
   
   The generated code is not checked in. All you have is your class definition 
that have the Immutables-specific annotations.
   
   > 
   > And what about for things that get stored long term for state? If the 
object definition changes, will the immutable library give us the ability to 
support / migrate definitions when users read things that might have been built 
from earlier versions of the objects? Have you experienced this to be an issue 
in practice?
   
   This isn't usually a big concern. When something like this evolves, one can 
switch from the generated JSON serializers to custom serializers and mark 
fields as optional. 
[This](https://github.com/projectnessie/nessie/blob/2b6b2c368c19e280d57b118bdbb1e5b4c41a3991/model/src/main/java/org/projectnessie/model/IcebergTable.java#L53-L54)
 for example uses auto-generated JSON serdes, but you always have the option to 
provide your own serializer and handle object evolution there. 
[Here](https://github.com/projectnessie/nessie/blob/05d1b7552be943189d16ee479b6cfb88e8621083/model/src/main/java/org/projectnessie/model/CommitMeta.java#L128-L164)
 and 
[here](https://github.com/projectnessie/nessie/blob/05d1b7552be943189d16ee479b6cfb88e8621083/model/src/main/java/org/projectnessie/model/CommitMeta.java#L93-L101)
 is an example for using a custom serializer with Immutables.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to