@Override
  public RelNode visit(HiveFilter filter) {

    RexNode newCond = filter.getCondition().accept(new HiveMaterializedViewASTSubQueryRewriteRexShuttle(this));
    return relBuilder
            .push(filter.getInput().accept(this))
            .filter(newCond)
            .build();
  }
Traverse the plan and tries to rewrite subtrees of the plan to materialized view scans.

The rewrite depends on whether the subtree's corresponding AST match with any materialized view
definitions AST.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveMaterializedViewASTSubQueryRewriteShuttle.java