Class FloatStatistics
- java.lang.Object
-
- org.apache.parquet.column.statistics.Statistics<Float>
-
- org.apache.parquet.column.statistics.FloatStatistics
-
public class FloatStatistics extends Statistics<Float>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.parquet.column.statistics.Statistics
Statistics.Builder
-
-
Constructor Summary
Constructors Constructor Description FloatStatistics()Deprecated.will be removed in 2.0.0.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareMaxToValue(float value)intcompareMinToValue(float value)FloatStatisticscopy()FloatgenericGetMax()Returns the max value in the statistics.FloatgenericGetMin()Returns the min value in the statistics.floatgetMax()byte[]getMaxBytes()Abstract method to return the max value as a byte arrayfloatgetMin()byte[]getMinBytes()Abstract method to return the min value as a byte arrayvoidinitializeStats(float min_value, float max_value)booleanisSmallerThan(long size)Abstract method to return whether the min and max values fit in the given size.voidmergeStatisticsMinMax(Statistics stats)Abstract method to merge this statistics min and max with the values of the parameter object.voidsetMinMax(float min, float max)voidsetMinMaxFromBytes(byte[] minBytes, byte[] maxBytes)Abstract method to set min and max values from byte arrays.voidupdateStats(float value)updates statistics min and max using the passed valuevoidupdateStats(float min_value, float max_value)-
Methods inherited from class org.apache.parquet.column.statistics.Statistics
comparator, compareMaxToValue, compareMinToValue, createStats, equals, getBuilderForReading, getNumNulls, getStatsBasedOnType, hashCode, hasNonNullValue, incrementNumNulls, incrementNumNulls, isEmpty, isNumNullsSet, markAsNotEmpty, maxAsString, mergeStatistics, minAsString, setNumNulls, toString, type, updateStats, updateStats, updateStats, updateStats, updateStats
-
-
-
-
Constructor Detail
-
FloatStatistics
@Deprecated public FloatStatistics()
Deprecated.will be removed in 2.0.0. UseStatistics.createStats(org.apache.parquet.schema.Type)instead
-
-
Method Detail
-
updateStats
public void updateStats(float value)
Description copied from class:Statisticsupdates statistics min and max using the passed value- Overrides:
updateStatsin classStatistics<Float>- Parameters:
value- value to use to update min and max
-
mergeStatisticsMinMax
public void mergeStatisticsMinMax(Statistics stats)
Description copied from class:StatisticsAbstract method to merge this statistics min and max with the values of the parameter object. Does not do any checks, only called internally.- Specified by:
mergeStatisticsMinMaxin classStatistics<Float>- Parameters:
stats- Statistics object to merge with
-
setMinMaxFromBytes
public void setMinMaxFromBytes(byte[] minBytes, byte[] maxBytes)Description copied from class:StatisticsAbstract method to set min and max values from byte arrays.- Specified by:
setMinMaxFromBytesin classStatistics<Float>- Parameters:
minBytes- byte array to set the min value tomaxBytes- byte array to set the max value to
-
getMaxBytes
public byte[] getMaxBytes()
Description copied from class:StatisticsAbstract method to return the max value as a byte array- Specified by:
getMaxBytesin classStatistics<Float>- Returns:
- byte array corresponding to the max value
-
getMinBytes
public byte[] getMinBytes()
Description copied from class:StatisticsAbstract method to return the min value as a byte array- Specified by:
getMinBytesin classStatistics<Float>- Returns:
- byte array corresponding to the min value
-
isSmallerThan
public boolean isSmallerThan(long size)
Description copied from class:StatisticsAbstract method to return whether the min and max values fit in the given size.- Specified by:
isSmallerThanin classStatistics<Float>- Parameters:
size- a size in bytes- Returns:
- true iff the min and max values are less than size bytes
-
updateStats
public void updateStats(float min_value, float max_value)
-
initializeStats
public void initializeStats(float min_value, float max_value)
-
genericGetMin
public Float genericGetMin()
Description copied from class:StatisticsReturns the min value in the statistics. The java natural order of the returned type defined byComparable.compareTo(Object)might not be the proper one. For example, UINT_32 requires unsigned comparison instead of the natural signed one. UseStatistics.compareMinToValue(Comparable)or the comparator returned byStatistics.comparator()to always get the proper ordering.- Specified by:
genericGetMinin classStatistics<Float>- Returns:
- the min value
-
genericGetMax
public Float genericGetMax()
Description copied from class:StatisticsReturns the max value in the statistics. The java natural order of the returned type defined byComparable.compareTo(Object)might not be the proper one. For example, UINT_32 requires unsigned comparison instead of the natural signed one. UseStatistics.compareMaxToValue(Comparable)or the comparator returned byStatistics.comparator()to always get the proper ordering.- Specified by:
genericGetMaxin classStatistics<Float>- Returns:
- the max value
-
compareMinToValue
public int compareMinToValue(float value)
-
compareMaxToValue
public int compareMaxToValue(float value)
-
getMax
public float getMax()
-
getMin
public float getMin()
-
setMinMax
public void setMinMax(float min, float max)
-
copy
public FloatStatistics copy()
- Specified by:
copyin classStatistics<Float>- Returns:
- a new independent statistics instance of this class.
-
-