private static MaterializationSnapshotFormatter createMaterializationSnapshotFormatter(
          MaterializationSnapshot snapshot) {
    if (snapshot != null && snapshot.getTableSnapshots() != null && !snapshot.getTableSnapshots().isEmpty()) {
      return qualifiedTableName -> {
        SnapshotContext snapshotContext = snapshot.getTableSnapshots().get(qualifiedTableName);
        if (snapshotContext == null) {
          return "Unknown";
        }
        return String.format("SnapshotContext{snapshotId=%d}", snapshotContext.getSnapshotId());
      };
    } else if (snapshot != null && snapshot.getValidTxnList() != null) {
      ValidTxnWriteIdList validReaderWriteIdList = ValidTxnWriteIdList.fromValue(snapshot.getValidTxnList());
      return qualifiedTableName -> {
        ValidWriteIdList writeIdList = validReaderWriteIdList.getTableValidWriteIdList(qualifiedTableName);
        return writeIdList != null ? writeIdList.toString().replace(qualifiedTableName, "") : "Unknown";
      };
    } else {
      return qualifiedTableName -> "N/A";
    }
  }
Formats DESC TABLE results to text format.
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/formatter/TextDescTableFormatter.java