parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java
private boolean overrideSortOrderToSigned(PrimitiveType type) {
    // even if the override is set, only return stats for string-ish types
    // a null type annotation is considered string-ish because some writers
    // failed to use the UTF8 annotation.
    LogicalTypeAnnotation annotation = type.getLogicalTypeAnnotation();
    return useSignedStringMinMax &&
        PrimitiveTypeName.BINARY == type.getPrimitiveTypeName() &&
        (annotation == null || STRING_TYPES.contains(annotation.getClass()));
  }
private boolean overrideSortOrderToSigned(PrimitiveType type) {
    // even if the override is set, only return stats for string-ish types
    // a null type annotation is considered string-ish because some writers
    // failed to use the UTF8 annotation.
    LogicalTypeAnnotation annotation = type.getLogicalTypeAnnotation();
    return useSignedStringMinMax &&
        PrimitiveTypeName.BINARY == type.getPrimitiveTypeName() &&
        (annotation == null || STRING_TYPES.contains(annotation.getClass()));
  }
Returns whether to use signed order min and max with a type. It is safe to
use signed min and max when the type is a string type and contains only
ASCII characters (where the sign bit was 0). This checks whether the type
is a string type and uses {@code useSignedStringMinMax} to determine if
only ASCII characters were written.

@param type a primitive type with a logical type annotation
@return true if signed order min/max can be used with this type