public HiveRelOptMaterialization getRewritingMaterializedView(String dbName, String viewName,
                                                         EnumSet<RewriteAlgorithm> scope) {
    HiveRelOptMaterialization materialization = materializedViewsCache.get(dbName, viewName);
    if (materialization == null) {
      return null;
    }
    if (!materialization.isSupported(scope)) {
      return null;
    }
    return materialization;
  }
Returns the materialized views in the cache for the given database.

@return the collection of materialized views, or the empty collection if none
ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveMaterializedViewsRegistry.java