private void addPartitionTransformData(DataOutputStream out, Table table, boolean isOutputPadded) throws IOException {
    String partitionTransformOutput = "";
    if (table.isNonNative() && table.getStorageHandler() != null &&
        table.getStorageHandler().supportsPartitionTransform()) {

      List<TransformSpec> partSpecs = table.getStorageHandler().getPartitionTransformSpec(table);
      if (partSpecs != null && !partSpecs.isEmpty()) {
        TextMetaDataTable metaDataTable = new TextMetaDataTable();
        partitionTransformOutput += LINE_DELIM + "# Partition Transform Information" + LINE_DELIM + "# ";
        metaDataTable.addRow(DescTableDesc.PARTITION_TRANSFORM_SPEC_SCHEMA.split("#")[0].split(","));
        for (TransformSpec spec : partSpecs) {
          String[] row = new String[2];
          row[0] = spec.getColumnName();
          if (spec.getTransformType() != null) {
            row[1] = spec.getTransformParam().isPresent() ?
                spec.getTransformType().name() + "[" + spec.getTransformParam().get() + "]" :
                spec.getTransformType().name();
          }
          metaDataTable.addRow(row);
        }
        partitionTransformOutput += metaDataTable.renderTable(isOutputPadded);
      }
    }
    out.write(partitionTransformOutput.getBytes(StandardCharsets.UTF_8));
  }
Formats DESC TABLE results to text format.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/formatter/TextDescTableFormatter.java