code: public Comparator<Columns> comparator() {
          return new Comparator<Columns>() {
              public int compare(Columns o1, Columns o2) {
  
                  if (o1 == null) {
                      return o2 == null ? 0 : 1;
                  }
                  if (o2 == null) {
                      return -1;
                  }
  
                  Column column1 = o1.getColumn(field);
                  Column column2 = o2.getColumn(field);
  
                  if (column1 == null) {
                      return column2 == null ? 0 : 1;
                  }
                  if (column2 == null) {
                      return -1;
                  }
  
                  AbstractType<?> type = column1.getType();
                  ByteBuffer value1 = column1.getDecomposedValue();
                  ByteBuffer value2 = column2.getDecomposedValue();
                  return reverse ? type.compare(value2, value1) : type.compare(value1, value2);
              }
          };
      }
docs: Returns a Java {@link Comparator} for {@link Columns} with the same logic as this {@link SortField}.
  
  @return A Java {@link Comparator} for {@link Columns} with the same logic as this {@link SortField}.