Hi Ian,
There are some workarounds to find the root node inside a RelRule match but
these rules become planner specific.
For instance, Hive applies some workarounds (e.g., in
HiveFieldTrimmerRule[1]) for running inside rules, transformations that
apply and modify the whole plan.
Best,
Stamatis
[
Hi Ian,
Is there any specific reason or use case that you have to match the root node
and find the parent node in your customized rule?
Thanks,
Haisheng Yuan
On 2021/05/03 20:20:22, Julian Hyde wrote:
> > Is there a way to identify a node as being a root node during RelRule.match?
>
> Not cu
> Is there a way to identify a node as being a root node during RelRule.match?
Not currently. One workaround would be to create 'class MyRoot extends
SingleRel', add it as the root of the tree, and write your rules to
match on it.
> Or more generally, is there a way to collect the parents of an a
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/calci