@Override public Statistics<?> build() { FloatStatistics stats = (FloatStatistics) super.build(); if (stats.hasNonNullValue()) { Float min = stats.genericGetMin(); Float max = stats.genericGetMax(); // Drop min/max values in case of NaN as the sorting order of values is undefined for this case if (min.isNaN() || max.isNaN()) { stats.setMinMax(0.0f, 0.0f); ((Statistics<?>) stats).hasNonNullValue = false; } else { // Updating min to -0.0 and max to +0.0 to ensure that no 0.0 values would be skipped if (Float.compare(min, 0.0f) == 0) { min = -0.0f; stats.setMinMax(min, max); } if (Float.compare(max, -0.0f) == 0) { max = 0.0f; stats.setMinMax(min, max); } } } return stats; } }
@Override public Statistics<?> build() { FloatStatistics stats = (FloatStatistics) super.build(); if (stats.hasNonNullValue()) { Float min = stats.genericGetMin(); Float max = stats.genericGetMax(); // Drop min/max values in case of NaN as the sorting order of values is undefined for this case if (min.isNaN() || max.isNaN()) { stats.setMinMax(0.0f, 0.0f); ((Statistics<?>) stats).hasNonNullValue = false; } else { // Updating min to -0.0 and max to +0.0 to ensure that no 0.0 values would be skipped if (Float.compare(min, 0.0f) == 0) { min = -0.0f; stats.setMinMax(min, max); } if (Float.compare(max, -0.0f) == 0) { max = 0.0f; stats.setMinMax(min, max); } } } return stats; } }
if (floatStatistics.genericGetMin() > floatStatistics.genericGetMax()) { failWithCorruptionException(failOnCorruptedParquetStatistics, column, id, floatStatistics); return Domain.create(ValueSet.all(type), hasNullValue);
if (floatStatistics.genericGetMin() > floatStatistics.genericGetMax()) { failWithCorruptionException(failOnCorruptedParquetStatistics, column, id, floatStatistics); return Domain.create(ValueSet.all(type), hasNullValue);