class TrimVisitor extends AllSameExpressionVisitor {
LogicalExpressionPlan plan;
TrimVisitor(LogicalExpressionPlan plan)
throws FrontendException {
super(plan, new ReverseDependencyOrderWalker(plan));
// the plan will be trimmed in-place on the original plan: this is
// ok because the ReverseDependencyOrderWalker first build the
// traversal ordering from the original plan, then starts the
// traversal which does not rely upon the topology of the original plan
this.plan = plan;