public class RuleExactMatch
Implentation of the Rule interface for Nodes Used in Node dispatching to dispatch
process/visitor functions for Nodes. The cost method returns 1 if there is an exact
match between the expression and the stack, otherwise -1.
The rule specified as operator names separated by % symbols, the left side represents the
bottom of the stack.
E.g. TS%FIL%RS -> means
TableScan Node followed by Filter followed by ReduceSink in the tree, or, in terms of the
stack, ReduceSink on top followed by Filter followed by TableScan
This function returns the cost of the rule for the specified stack. Returns 1 if there is
an exact match with the entire stack, otherwise -1
If any proper substack of the stack matches it will return -1. It only returns 1 if the
entire stack matches the rule exactly.