I think the answer is no. At least that is my impression with volcano planner in latest Calcite. Matched rules will be categorized by matching root nodes' classes. And the execution, which is, the onMatch() function, will be executed in the order of iterating through the categories. So the order is not related to the relnode level or the order of rules in the rule list.
On Mar 5, 2018 7:02 PM, "张静" <[email protected]> wrote: Hi, guys. Can we safely assuming that the rules match nodes which are closer to root would execute earlier than those rules matches nodes which are closer to tableScan? For the following nodes tree, can we assume the rules matches aggregate are always execute earlier than the rules matches filter? Aggregate |_Project |_Filter |_TableScan
