private String getColumns(Table table) {
    List<String> columnDescs = new ArrayList<>();
    for (FieldSchema column : table.getCols()) {
      String columnType = formatType(TypeInfoUtils.getTypeInfoFromTypeString(column.getType()));
      String columnDesc = "  " + unparseIdentifier(column.getName()) + " " + columnType;
      if (column.getComment() != null) {
        columnDesc += " COMMENT '" + HiveStringUtils.escapeHiveCommand(column.getComment()) + "'";
      }
      columnDescs.add(columnDesc);
    }
    return StringUtils.join(columnDescs, ", \n");
  }
Returns the create view statement for the given view.

@param table
@return create view statement.
ql/src/java/org/apache/hadoop/hive/ql/exec/DDLPlanUtils.java