private void addFormattedTableData(DataOutputStream out, Table table, Partition partition, boolean isOutputPadded)
      throws IOException, UnsupportedEncodingException {
    String formattedTableInfo = null;
    if (partition != null) {
      formattedTableInfo = getPartitionInformation(table, partition);
    } else {
      formattedTableInfo = getTableInformation(table, isOutputPadded);
    }

    if (table.getTableConstraintsInfo().isTableConstraintsInfoNotEmpty()) {
      formattedTableInfo += getConstraintsInformation(table);
    }
    out.write(formattedTableInfo.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