In the transform API :
def transformUpWithPruning(cond: TreePatternBits => Boolean,
    ruleId: RuleId = UnknownRuleId)(rule: PartialFunction[BaseType,
BaseType])

my understanding is that the information whether a TreeNode ( be Plan or
Expression) keeps the state in a local var in the Plan, to track if the
rule is effective or not, based on first time traversal results.

Now if say a batch has two rules ( Rule A and rule B) , such that rule B
changes the node ( Plan or Expression) , but rule A does not..
Am I right in understanding that in such case the effect of pruning will be
lost for rule A, as rule B is creating new nodes and hence information will
be lost?

Regards
Asif

Reply via email to