Class BinaryStatistics
java.lang.Object
org.apache.parquet.column.statistics.Statistics<Binary>
org.apache.parquet.column.statistics.BinaryStatistics
- Direct Known Subclasses:
Float16Statistics,IEEE754Float16Statistics
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.parquet.column.statistics.Statistics
Statistics.Builder -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionDeprecated.will be removed in 2.0.0.protectedBinaryStatistics(BinaryStatistics other) -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns the max value in the statistics.Returns the min value in the statistics.getMax()Deprecated.usegenericGetMax(), will be removed in 2.0.0byte[]Abstract method to return the max value as a byte arraygetMin()Deprecated.usegenericGetMin(), will be removed in 2.0.0byte[]Abstract method to return the min value as a byte arrayvoidinitializeStats(Binary min_value, Binary max_value) Deprecated.useupdateStats(Binary), will be removed in 2.0.0booleanisSmallerThan(long size) Abstract method to return whether the min and max values fit in the given size.booleanisSmallerThanWithTruncation(long size, int truncationLength) voidmergeStatisticsMinMax(Statistics stats) Abstract method to merge this statistics min and max with the values of the parameter object.voidDeprecated.useupdateStats(Binary), will be removed in 2.0.0voidsetMinMaxFromBytes(byte[] minBytes, byte[] maxBytes) Sets min and max values, re-uses the byte[] passed in.voidupdateStats(Binary value) updates statistics min and max using the passed valuevoidupdateStats(Binary min_value, Binary max_value) Deprecated.useupdateStats(Binary), will be removed in 2.0.0Methods inherited from class org.apache.parquet.column.statistics.Statistics
comparator, compareMaxToValue, compareMinToValue, createStats, equals, getBuilderForReading, getNanCount, getNumNulls, getStatsBasedOnType, hashCode, hasNonNullValue, incrementNanCount, incrementNanCount, incrementNumNulls, incrementNumNulls, isEmpty, isNanCountSet, isNumNullsSet, markAsNotEmpty, maxAsString, mergeStatistics, minAsString, noopStats, setNumNulls, toString, type, unsetNanCount, updateStats, updateStats, updateStats, updateStats, updateStats
-
Field Details
-
max
-
min
-
-
Constructor Details
-
BinaryStatistics
Deprecated.will be removed in 2.0.0. UseStatistics.createStats(org.apache.parquet.schema.Type)instead -
BinaryStatistics
-
-
Method Details
-
updateStats
Description copied from class:Statisticsupdates statistics min and max using the passed value- Overrides:
updateStatsin classStatistics<Binary>- Parameters:
value- value to use to update min and max
-
mergeStatisticsMinMax
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<Binary>- Parameters:
stats- Statistics object to merge with
-
setMinMaxFromBytes
public void setMinMaxFromBytes(byte[] minBytes, byte[] maxBytes) Sets min and max values, re-uses the byte[] passed in. Any changes made to byte[] will be reflected in min and max values as well.- Specified by:
setMinMaxFromBytesin classStatistics<Binary>- 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<Binary>- 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<Binary>- 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<Binary>- Parameters:
size- a size in bytes- Returns:
- true iff the min and max values are less than size bytes
-
isSmallerThanWithTruncation
public boolean isSmallerThanWithTruncation(long size, int truncationLength) -
updateStats
Deprecated.useupdateStats(Binary), will be removed in 2.0.0- Parameters:
min_value- a min binarymax_value- a max binary
-
initializeStats
Deprecated.useupdateStats(Binary), will be removed in 2.0.0- Parameters:
min_value- a min binarymax_value- a max binary
-
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<Binary>- Returns:
- the min value
-
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<Binary>- Returns:
- the max value
-
getMax
Deprecated.usegenericGetMax(), will be removed in 2.0.0- Returns:
- the max binary
-
getMin
Deprecated.usegenericGetMin(), will be removed in 2.0.0- Returns:
- the min binary
-
setMinMax
Deprecated.useupdateStats(Binary), will be removed in 2.0.0- Parameters:
min- a min binarymax- a max binary
-
copy
- Specified by:
copyin classStatistics<Binary>- Returns:
- a new independent statistics instance of this class.
-