Class BooleanStatistics
java.lang.Object
org.apache.parquet.column.statistics.Statistics<Boolean>
org.apache.parquet.column.statistics.BooleanStatistics
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.parquet.column.statistics.Statistics
Statistics.Builder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareMaxToValue(boolean value) intcompareMinToValue(boolean value) copy()Returns the max value in the statistics.Returns the min value in the statistics.booleangetMax()byte[]Abstract method to return the max value as a byte arraybooleangetMin()byte[]Abstract method to return the min value as a byte arrayvoidinitializeStats(boolean min_value, boolean 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(boolean min, boolean max) voidsetMinMaxFromBytes(byte[] minBytes, byte[] maxBytes) Abstract method to set min and max values from byte arrays.voidupdateStats(boolean value) updates statistics min and max using the passed valuevoidupdateStats(boolean min_value, boolean max_value) Methods 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
-
Constructor Details
-
BooleanStatistics
Deprecated.will be removed in 2.0.0. UseStatistics.createStats(org.apache.parquet.schema.Type)instead
-
-
Method Details
-
updateStats
public void updateStats(boolean value) Description copied from class:Statisticsupdates statistics min and max using the passed value- Overrides:
updateStatsin classStatistics<Boolean>- 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<Boolean>- 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<Boolean>- 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<Boolean>- 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<Boolean>- 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<Boolean>- Parameters:
size- a size in bytes- Returns:
- true iff the min and max values are less than size bytes
-
updateStats
public void updateStats(boolean min_value, boolean max_value) -
initializeStats
public void initializeStats(boolean min_value, boolean max_value) -
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<Boolean>- 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<Boolean>- Returns:
- the max value
-
compareMinToValue
public int compareMinToValue(boolean value) -
compareMaxToValue
public int compareMaxToValue(boolean value) -
getMax
public boolean getMax() -
getMin
public boolean getMin() -
setMinMax
public void setMinMax(boolean min, boolean max) -
copy
- Specified by:
copyin classStatistics<Boolean>- Returns:
- a new independent statistics instance of this class.
-