private void dedupWithTableInfo() {
    assert tableInfo != null : "TableInfo can't be null at this point.";
    if (partitionSchema != null) {
      if (partitionSchema.equals(tableInfo.getDataColumns())) {
        partitionSchema = null;
      } else {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Can't suppress data-schema. Partition-schema and table-schema seem to differ! "
              + " partitionSchema: " + partitionSchema.getFields()
              + " tableSchema: " + tableInfo.getDataColumns());
        }
      }
    }

    if (storageHandlerClassName != null) {
      if (storageHandlerClassName.equals(tableInfo.getStorerInfo().getStorageHandlerClass())) {
        storageHandlerClassName = null;
      } else {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Partition's storageHandler (" + storageHandlerClassName + ") " +
              "differs from table's storageHandler (" + tableInfo.getStorerInfo().getStorageHandlerClass() + ").");
        }
      }
    }

    if (inputFormatClassName != null) {
      if (inputFormatClassName.equals(tableInfo.getStorerInfo().getIfClass())) {
        inputFormatClassName = null;
      } else {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Partition's InputFormat (" + inputFormatClassName + ") " +
              "differs from table's InputFormat (" + tableInfo.getStorerInfo().getIfClass() + ").");
        }
      }
    }

    if (outputFormatClassName != null) {
      if (outputFormatClassName.equals(tableInfo.getStorerInfo().getOfClass())) {
        outputFormatClassName = null;
      } else {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Partition's OutputFormat (" + outputFormatClassName + ") " +
              "differs from table's OutputFormat (" + tableInfo.getStorerInfo().getOfClass() + ").");
        }
      }
    }

    if (serdeClassName != null) {
      if (serdeClassName.equals(tableInfo.getStorerInfo().getSerdeClass())) {
        serdeClassName = null;
      } else {
        if (LOG.isDebugEnabled()) {
          LOG.debug("Partition's SerDe (" + serdeClassName + ") " +
              "differs from table's SerDe (" + tableInfo.getStorerInfo().getSerdeClass() + ").");
        }
      }
    }
  }
Finds commonalities with TableInfo, and suppresses (nulls) fields if they are identical
hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/PartInfo.java