private static void getMaterializedViewInfo(StringBuilder tableInfo, Table table, boolean isOutputPadded) {
    formatOutput("Rewrite Enabled:", table.isRewriteEnabled() ? "Yes" : "No", tableInfo);
    formatOutput("Outdated for Rewriting:", table.isOutdatedForRewriting() == null ? "Unknown"
        : table.isOutdatedForRewriting() ? "Yes" : "No", tableInfo);
    tableInfo.append(LINE_DELIM).append("# Materialized View Source table information").append(LINE_DELIM);
    TextMetaDataTable metaDataTable = new TextMetaDataTable();
    metaDataTable.addRow("Table name", "Snapshot");
    List<SourceTable> sourceTableList = new ArrayList<>(table.getMVMetadata().getSourceTables());

    sourceTableList.sort(Comparator.<SourceTable, String>comparing(sourceTable -> sourceTable.getTable().getDbName())
            .thenComparing(sourceTable -> sourceTable.getTable().getTableName()));

    MaterializationSnapshotFormatter snapshotFormatter =
            createMaterializationSnapshotFormatter(table.getMVMetadata().getSnapshot());

    for (SourceTable sourceTable : sourceTableList) {
      String qualifiedTableName = TableName.getDbTable(
              sourceTable.getTable().getDbName(),
              sourceTable.getTable().getTableName());
      metaDataTable.addRow(qualifiedTableName,
              snapshotFormatter.getSnapshotOf(qualifiedTableName));
    }
    tableInfo.append(metaDataTable.renderTable(isOutputPadded));
  }
Formats DESC TABLE results to text format.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/formatter/TextDescTableFormatter.java