zhangjiashen commented on code in PR #1142:
URL: https://github.com/apache/parquet-mr/pull/1142#discussion_r1371132290


##########
parquet-column/src/main/java/org/apache/parquet/column/statistics/Statistics.java:
##########
@@ -150,26 +150,26 @@ public Float16Builder(PrimitiveType type) {
 
     @Override
     public Statistics<?> build() {
-      Float16Statistics stats = (Float16Statistics) super.build();
+      BinaryStatistics stats = (BinaryStatistics) super.build();
       if (stats.hasNonNullValue()) {
         Binary bMin = stats.genericGetMin();
         Binary bMax = stats.genericGetMax();
         short min = bMin.get2BytesLittleEndian();
         short max = bMax.get2BytesLittleEndian();
         // Drop min/max values in case of NaN as the sorting order of values 
is undefined for this case
         if (Float16.isNaN(min) || Float16.isNaN(max)) {
-          bMin = 
Binary.fromConstantByteArray(Float16.POSITIVE_ZERO_BYTES_LITTLE_ENDIAN);
-          bMax = 
Binary.fromConstantByteArray(Float16.POSITIVE_ZERO_BYTES_LITTLE_ENDIAN);
+          bMin = Binary.fromConstantByteArray(new byte[] {0x00, 0x00});
+          bMax = Binary.fromConstantByteArray(new byte[] {0x00, (byte) 0x80});

Review Comment:
   updated, thanks!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@parquet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to