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

Julian Hyde commented on CALCITE-3723:
--------------------------------------

Yeah, changing the constructor of a {{RelNode}} is a lot of impact. So we don't 
do it often.

And yes, you do need to change the corresponding factory. Since factories are 
not widely used, maybe we could remove the old methods after 1 or 2 minor 
releases.

We recommend that people use {{RelBuilder}} to create {{RelNode}} instances. It 
will insulate you from most such changes.

By the way, we need to add hints to {{RelBuilder}}. Is there a way to do it in 
a backwards-compatible way?

> Following the change to add hints to RelNode, deprecate the old constructors
> ----------------------------------------------------------------------------
>
>                 Key: CALCITE-3723
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3723
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Priority: Major
>
> In CALCITE-482 and CALCITE-3590 we added constructors for various sub-classes 
> RelNode ({{LogicalProject}}, {{LogicalAggregate}}, and others) that take a 
> list of hints. But now those classes have two constructors. Our practice has 
> been to have only one (public, non-deprecated) constructor in each RelNode 
> class. (Otherwise we would have dozens.) So, please deprecate the old 
> constructors and change code that uses them.
> Can we do this before 1.22?
> Also note that the new and old constructors have exactly the same comment. 
> You should avoid that. But in this case, just remove the comment of the 
> deprecated constructor.
> The non-hints constructor does {{new ArrayList<>()}}. Please change to use 
> {{ImmutableList.of()}}, which saves a malloc.
> cc [~danny0405] and [~icshuo].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to