private String getBuckets(Table table) {
    List<String> bucketCols = table.getBucketCols();
    if (bucketCols.isEmpty()) {
      return "";
    }
    String buckets = "CLUSTERED BY (\n  " + unparseListOfIdentifiersAndJoin(bucketCols, ",\n  ") + ")\n";

    List<Order> sortColumns = table.getSortCols();
    if (!sortColumns.isEmpty()) {
      List<String> sortKeys = new ArrayList<String>();
      for (Order sortColumn : sortColumns) {
        String sortKeyDesc = "  " + unparseIdentifier(sortColumn.getCol()) + " " +
            DirectionUtils.codeToText(sortColumn.getOrder());
        sortKeys.add(sortKeyDesc);
      }
      buckets += "SORTED BY ( \n" + StringUtils.join(sortKeys, ", \n") + ") \n";
    }

    buckets += "INTO " + table.getNumBuckets() + " BUCKETS";
    return buckets;
  }
Struct fields are identifiers, need to be unparsed.
ql/src/java/org/apache/hadoop/hive/ql/exec/DDLPlanUtils.java