Hello,
I am trying to write a rule that matches (among other things) the root of a 
RelNode tree.

Unfortunately, it seems that HepRuleCall.parents is only initialized and 
populated if the rule extends CommonRelSubExpr, which doesn’t really apply in 
my case.
(see: 
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/plan/hep/HepPlanner.java#L526)

Is there a way to identify a node as being a root node during RelRule.match? Or 
more generally, is there a way to collect the parents of an arbitrary RelNode?

Thanks.

Reply via email to