public static MaterializationSnapshot getSnapshotOf(DDLOperationContext context, Set<TableName> tables)
          throws HiveException {
    Map<String, SnapshotContext> snapshot = getSnapshotOf(context.getDb(), tables);
    if (snapshot.isEmpty()) {
      return new MaterializationSnapshot(context.getConf().get(ValidTxnWriteIdList.VALID_TABLES_WRITEIDS_KEY));
    }

    return new MaterializationSnapshot(snapshot);
  }
Validate if given materialized view has SELECT privileges for current user
@param cachedMVTableList
@return false if user does not have privilege otherwise true
@throws HiveException
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/views/HiveMaterializedViewUtils.java