code: public static String toExpression(PartitionStrategy partitionStrategy) {
      List<FieldPartitioner> fieldPartitioners = partitionStrategy
          .getFieldPartitioners();
      if (fieldPartitioners.size() == 1) {
        return PartitionFunctions.toExpression(fieldPartitioners.get(0));
      }
      StringBuilder sb = new StringBuilder();
      sb.append("[");
      for (FieldPartitioner fieldPartitioner : fieldPartitioners) {
        if (sb.length() > 1) {
          sb.append(", ");
        }
        sb.append(PartitionFunctions.toExpression(fieldPartitioner));
      }
      sb.append("]");
      return sb.toString();
    }
docs: Convert a PartitionStrategy into a serialized expression. This can be used
  to set a PartitionStrategy in an Avro property if the PartitionStrategy is
  passed as an object.