public List<Table> getAllMaterializedViewObjectsForRewriting() throws HiveException {
    try {
      return getMSC().getAllMaterializedViewObjectsForRewriting()
          .stream()
          .map(Table::new)
          .collect(Collectors.toList());
    } catch (Exception e) {
      throw new HiveException(e);
    }
  }
Get the target materialized view from the metastore. Although it may load the plan
from the registry, it is guaranteed that it will always return an up-to-date version
wrt metastore.

@return the materialized view for rebuild
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java