Class IntStatistics
- java.lang.Object
-
- org.apache.parquet.column.statistics.Statistics<Integer>
-
- org.apache.parquet.column.statistics.IntStatistics
-
public class IntStatistics extends Statistics<Integer>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.parquet.column.statistics.Statistics
Statistics.Builder
-
-
Constructor Summary
Constructors Constructor Description IntStatistics()
Deprecated.will be removed in 2.0.0.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareMaxToValue(int value)
int
compareMinToValue(int value)
IntStatistics
copy()
Integer
genericGetMax()
Returns the max value in the statistics.Integer
genericGetMin()
Returns the min value in the statistics.int
getMax()
byte[]
getMaxBytes()
Abstract method to return the max value as a byte arrayint
getMin()
byte[]
getMinBytes()
Abstract method to return the min value as a byte arrayvoid
initializeStats(int min_value, int max_value)
boolean
isSmallerThan(long size)
Abstract method to return whether the min and max values fit in the given size.void
mergeStatisticsMinMax(Statistics stats)
Abstract method to merge this statistics min and max with the values of the parameter object.void
setMinMax(int min, int max)
void
setMinMaxFromBytes(byte[] minBytes, byte[] maxBytes)
Abstract method to set min and max values from byte arrays.void
updateStats(int value)
updates statistics min and max using the passed valuevoid
updateStats(int min_value, int 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
-
IntStatistics
@Deprecated public IntStatistics()
Deprecated.will be removed in 2.0.0. UseStatistics.createStats(org.apache.parquet.schema.Type)
instead
-
-
Method Detail
-
updateStats
public void updateStats(int value)
Description copied from class:Statistics
updates statistics min and max using the passed value- Overrides:
updateStats
in classStatistics<Integer>
- Parameters:
value
- value to use to update min and max
-
mergeStatisticsMinMax
public void mergeStatisticsMinMax(Statistics stats)
Description copied from class:Statistics
Abstract 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:
mergeStatisticsMinMax
in classStatistics<Integer>
- Parameters:
stats
- Statistics object to merge with
-
setMinMaxFromBytes
public void setMinMaxFromBytes(byte[] minBytes, byte[] maxBytes)
Description copied from class:Statistics
Abstract method to set min and max values from byte arrays.- Specified by:
setMinMaxFromBytes
in classStatistics<Integer>
- 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:Statistics
Abstract method to return the max value as a byte array- Specified by:
getMaxBytes
in classStatistics<Integer>
- Returns:
- byte array corresponding to the max value
-
getMinBytes
public byte[] getMinBytes()
Description copied from class:Statistics
Abstract method to return the min value as a byte array- Specified by:
getMinBytes
in classStatistics<Integer>
- Returns:
- byte array corresponding to the min value
-
isSmallerThan
public boolean isSmallerThan(long size)
Description copied from class:Statistics
Abstract method to return whether the min and max values fit in the given size.- Specified by:
isSmallerThan
in classStatistics<Integer>
- Parameters:
size
- a size in bytes- Returns:
- true iff the min and max values are less than size bytes
-
updateStats
public void updateStats(int min_value, int max_value)
-
initializeStats
public void initializeStats(int min_value, int max_value)
-
genericGetMin
public Integer genericGetMin()
Description copied from class:Statistics
Returns 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:
genericGetMin
in classStatistics<Integer>
- Returns:
- the min value
-
genericGetMax
public Integer genericGetMax()
Description copied from class:Statistics
Returns 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:
genericGetMax
in classStatistics<Integer>
- Returns:
- the max value
-
compareMinToValue
public int compareMinToValue(int value)
-
compareMaxToValue
public int compareMaxToValue(int value)
-
getMax
public int getMax()
-
getMin
public int getMin()
-
setMinMax
public void setMinMax(int min, int max)
-
copy
public IntStatistics copy()
- Specified by:
copy
in classStatistics<Integer>
- Returns:
- a new independent statistics instance of this class.
-
-