public Multimap<Class<? extends RelNode>, RelNode> getNodeTypes(RelSubset rel,
        RelMetadataQuery mq) {
      for (RelNode node : rel.getRelList()) {
        if (node instanceof Box) {
          return mq.getNodeTypes(node);
        }
      }
      return mq.getNodeTypes(Util.first(rel.getBest(), rel.getOriginal()));
    }
Metadata provider implementation that is only used for MV rewriting.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/views/HiveMaterializationRelMetadataProvider.java