public List<HiveRelOptMaterialization> get(ASTNode astNode) {
    List<HiveRelOptMaterialization> relOptMaterializationList = sqlToMaterializedView.get(new ASTKey(astNode));
    if (relOptMaterializationList == null) {
      if (LOG.isTraceEnabled()) {
        LOG.trace("No materialized view with query text '{}' found in registry.", astNode.dump());
      }
      LOG.debug("No materialized view with similar query text found in registry.");
      return emptyList();
    }
    if (LOG.isTraceEnabled()) {
      LOG.trace("{} materialized view(s) found with query text '{}' in registry",
              relOptMaterializationList.size(), astNode.dump());
    }
    LOG.debug("{} materialized view(s) found with similar query text found in registry",
            relOptMaterializationList.size());
    return unmodifiableList(relOptMaterializationList);
  }
Collection for storing {@link HiveRelOptMaterialization}s.
Materialization can be lookup by
- the Materialized View fully qualified name
- query text.
This implementation contains two {@link ConcurrentHashMap} one for name based and one for query text based lookup.
The map contents are synchronized during each dml operation: Dml operations are performed initially on the map
which provides name based lookup. The map which provides query text based lookup is updated by lambda expressions
passed to {@link ConcurrentHashMap#compute(Object, BiFunction)}.
ql/src/java/org/apache/hadoop/hive/ql/metadata/MaterializedViewsCache.java