public String renderTable(boolean isOutputPadded) {
      StringBuilder stringBuilder = new StringBuilder();
      for (List<String> row : table) {
        formatOutput(row.toArray(new String[0]), stringBuilder, isOutputPadded, isOutputPadded);
      }
      return stringBuilder.toString();
    }
Helps to format tables in SHOW ... command outputs.
ql/src/java/org/apache/hadoop/hive/ql/ddl/ShowUtils.java