Rules describe a pattern of operators. They also reference a Transformer.
If the pattern of operators is found one or more times in the provided plan,
then the optimizer will use the associated Transformer to transform the
Note: the pattern matching logic implemented here has a limitation
that it assumes that all the leaves in the pattern are siblings. See more
detailed description here - https://issues.apache.org/jira/browse/PIG-1742
If new rules use patterns that don't work with this limitation, the pattern
match logic will need to be updated.
Get the transformer for this rule. Abstract because the rule
may want to choose how to instantiate the transformer.
This should never return a cached transformer, it should
always return a fresh one with no state.
Search for all the sub-plans that matches the pattern
defined by this rule.
See class description above for limitations on the patterns supported.
plan - the OperatorPlan to look for matches to the pattern
A list of all matched sub-plans. The returned plans are
partial views of the original OperatorPlan. Each is a
sub-set of the original plan and represents the same
topology as the pattern, but operators in the returned plan
are the same objects as the original plan. Therefore,
a call getPlan() from any node in the return plan would
return the original plan.