@Override
  public void describeTable(HiveConf conf, DataOutputStream out, String columnPath, String tableName, Table table,
      Partition partition, List<FieldSchema> columns, boolean isFormatted, boolean isExtended, boolean isOutputPadded,
      List<ColumnStatisticsObj> columnStats) throws HiveException {
    try {
      addStatsData(out, conf, columnPath, columns, isFormatted, columnStats, isOutputPadded);
      addPartitionData(out, conf, columnPath, table, isFormatted, isOutputPadded);

      boolean isIcebergMetaTable = table.getMetaTable() != null;
      if (columnPath == null && !isIcebergMetaTable) {
        addPartitionTransformData(out, table, isOutputPadded);
        if (isFormatted) {
          addFormattedTableData(out, table, partition, isOutputPadded);
        }

        if (isExtended) {
          out.write(Utilities.newLineCode);
          addExtendedTableData(out, table, partition);
          addExtendedConstraintData(out, table);
          addExtendedStorageData(out, table);
        }
      }
    } catch (IOException e) {
      throw new HiveException(e);
    }
  }
Formats DESC TABLE results to text format.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/formatter/TextDescTableFormatter.java