private static Set<WriteEntity> getOutputs(BaseSemanticAnalyzer sem) {
    Set<WriteEntity> additionalOutputs = new HashSet<WriteEntity>();
    for (WriteEntity e : sem.getOutputs()) {
      if (e.getType() == Entity.Type.PARTITION) {
        additionalOutputs.add(new WriteEntity(e.getTable(), e.getWriteType()));
      }
    }

    // Sets.union keeps the values from the first set if they are present in both
    return Sets.union(sem.getOutputs(), additionalOutputs);
  }
@param command Passed so that authorization interface can provide more useful information in logs.
ql/src/java/org/apache/hadoop/hive/ql/security/authorization/command/CommandAuthorizer.java