[ 
https://issues.apache.org/jira/browse/CALCITE-4787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17418905#comment-17418905
 ] 

Jacques Nadeau commented on CALCITE-4787:
-----------------------------------------

Immutables can handle either pattern. The reason I chose parameterization is 
that with override I'd expect there to be 300-400 additional lines of 
duplicated code just in the core changes (at least methods in every rule * 100+ 
rules plus other rules which have multiple class levels & additional 
attributes). There is also a maintainability problem with the duplication in 
that if one introduces a new method on the base class, you either need to go to 
all the subclasses or have a different return type for that method.

> Evaluate use of Immutables instead of ImmutableBeans
> ----------------------------------------------------
>
>                 Key: CALCITE-4787
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4787
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Jacques Nadeau
>            Assignee: Jacques Nadeau
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 4h 20m
>  Remaining Estimate: 0h
>
> In the creation of CALCITE-3328, [Immutables|https://immutables.github.io/] 
> 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 message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to