Walks over a tree of relational expressions, replacing each {@link RelNode} with a 'slimmed down' relational expression that projectsonly the fields required by its consumer.
This may make things easier for the optimizer, by removing crud that would expand the search space, but is difficult for the optimizer itself to do it, because optimizer rules must preserve the number and type of fields. Hence, this transform that operates on the entire tree, similar to the {@link RelStructuredTypeFlattener type-flattening transform}.
Currently this functionality is disabled in farrago/luciddb; the default implementation of this method does nothing.
@param rootRel Relational expression that is at the root of the tree
@return Trimmed relational expression