parquet-column/src/main/java/org/apache/parquet/schema/PrimitiveType.java
@SuppressWarnings("unchecked")
  public <T> PrimitiveComparator<T> comparator() {
    return (PrimitiveComparator<T>) getPrimitiveTypeName().comparator(getLogicalTypeAnnotation());
  }
@SuppressWarnings("unchecked")
  public <T> PrimitiveComparator<T> comparator() {
    return (PrimitiveComparator<T>) getPrimitiveTypeName().comparator(getLogicalTypeAnnotation());
  }
Returns the {@link Type} specific comparator for properly comparing values. The natural ordering of the values
might not proper in certain cases (e.g. {@code UINT_32} requires unsigned comparison of {@code int} values while
the natural ordering is signed.)

@param <T> the type of values compared by the returned PrimitiveComparator
@return a PrimitiveComparator for values of this type