In the creation of
CALCITE-3328, Immutables was discussed as an alternative to a custom implementation. This ticket is to evaluate the impact to the codebase of changing. Ideally, introduction of immutables would both add flexibility and reduce the amount of code associated with these classes.
Immutables works via annotation processor which means that it is should be relatively seamless to build systems and IDEs.
The switch would also make it easier to work with these objects types in the context of aot compilation tools like GraalVM.
This initial task covers key classes in the core module. Will open up follow-on tickets for other locations.