Re: [DISCUSS] Evaluate usage of Immutables library

2021-12-09 Thread Eduard Tudenhoefner
I created #3697 that gives an example of how subclasses of *FileScanTask* can be converted to Immutables. On Thu, Dec 9, 2021 at 1:53 AM Jack Ye wrote: > For JSON serialization of objects such as FileScanTask, I have been > experimenting about the be

Re: [DISCUSS] Evaluate usage of Immutables library

2021-12-09 Thread Eduard Tudenhoefner
My intention was not to rewrite significant pieces of existing & working code. The experiment with *TableMetadata* was for example to show an alternative approach to writing simple hand-written builders (since we get the builder for free). #3580 just co

Re: [DISCUSS] Evaluate usage of Immutables library

2021-12-08 Thread Jack Ye
For JSON serialization of objects such as FileScanTask, I have been experimenting about the best way to achieve that. So far the best way I see is actually still to use a fully customized JSON parser like what we did for TableMetadata. This is because there are many sub-classes of the FileScanTask

Re: [DISCUSS] Evaluate usage of Immutables library

2021-12-08 Thread Ryan Blue
This could be valuable for some things, but I'm skeptical that we would want to rewrite significant pieces of existing code this way. For example, you mentioned being able to "get rid of hand-written JSON serializers/deserializers". Automatic serialization is fiddly. You end up needing to scatter