private Set<Table> tablesFromReadEntities(Set<ReadEntity> readEntities) {
    return readEntities.stream()
        .filter(entity -> entity.getType() == Entity.Type.TABLE)
        .map(Entity::getTable)
        .collect(Collectors.toSet());
  }
Called after a query plan has been generated, to determine if the results of this query
can be added to the results cache.
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java