Hi Julian/Apache Calcite Dev Team,
Thank you very much for your reply
I see that's a good point and it makes a lot of sense. I think I should
exactly tell you what my problem is: I am only trying to override the cost
function so that I can group operators in a certain way in the Relational
Tree.

That is the only functionality that is required (for my example) right now.
I was extending the rules and the nodes to override this 1 function only.
Is there another way to do this? If not, what is the recommended approach
(is it to duplicate the enumerable rels and rules)?

Please let me know.

Thanks & Regards,
Pranav

On Fri, Sep 16, 2022 at 3:13 PM Julian Hyde <[email protected]> wrote:

> We don’t necessary want you to extend existing classes. If we change the
> base class in future, your code breaks, and you complain that we have
> broken semantic versioning. Making things private is, in that sense, a
> feature.
>
> If what you are doing is a feature that would benefit other Calcite users,
> you should propose that feature.
>
> Julian
>
>
> > On Sep 16, 2022, at 11:41 AM, Pranav Deshpande <
> [email protected]> wrote:
> >
> > Dear Apache Calcite Team,
> > I am trying to modify some parts of the RelNode Tree in Calcite for my
> own
> > custom logic. For this, I am extending existing nodes (eg.
> > EnumerableAggregate etc.) and then also extending the respective rule
> (eg.
> > EnumerableAggregateRule) and overriding the respective functions in both
> so
> > that my custom node is used in the tree (logical -> custom node which is
> > basically an extended enumerable) instead of logical -> enumerable.
> >
> > Some of the rules here (eg. EnumerableLimit) have references to Immutable
> > classes which are package private and I hence I am unable to extend these
> > (EnumerableLimitRule is itself one such example:
> >
> https://github.com/apache/calcite/blob/b9c2099ea92a575084b55a206efc5dd341c0df62/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableLimitRule.java#L72
> > )
> >
> > Any advice on how I can solve this problem?
> >
> > Thanks & Regards,
> > Pranav
>
>

Reply via email to