Class BinaryStatistics
- java.lang.Object
-
- org.apache.parquet.column.statistics.Statistics<Binary>
-
- org.apache.parquet.column.statistics.BinaryStatistics
-
public class BinaryStatistics extends Statistics<Binary>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.parquet.column.statistics.Statistics
Statistics.Builder
-
-
Constructor Summary
Constructors Constructor Description BinaryStatistics()
Deprecated.will be removed in 2.0.0.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BinaryStatistics
copy()
Binary
genericGetMax()
Returns the max value in the statistics.Binary
genericGetMin()
Returns the min value in the statistics.Binary
getMax()
Deprecated.usegenericGetMax()
, will be removed in 2.0.0byte[]
getMaxBytes()
Abstract method to return the max value as a byte arrayBinary
getMin()
Deprecated.usegenericGetMin()
, will be removed in 2.0.0byte[]
getMinBytes()
Abstract method to return the min value as a byte arrayvoid
initializeStats(Binary min_value, Binary max_value)
Deprecated.useupdateStats(Binary)
, will be removed in 2.0.0boolean
isSmallerThan(long size)
Abstract method to return whether the min and max values fit in the given size.boolean
isSmallerThanWithTruncation(long size, int truncationLength)
void
mergeStatisticsMinMax(Statistics stats)
Abstract method to merge this statistics min and max with the values of the parameter object.void
setMinMax(Binary min, Binary max)
Deprecated.useupdateStats(Binary)
, will be removed in 2.0.0void
setMinMaxFromBytes(byte[] minBytes, byte[] maxBytes)
Sets min and max values, re-uses the byte[] passed in.void
updateStats(Binary value)
updates statistics min and max using the passed valuevoid
updateStats(Binary min_value, Binary max_value)
Deprecated.useupdateStats(Binary)
, will be removed in 2.0.0-
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
-
BinaryStatistics
@Deprecated public BinaryStatistics()
Deprecated.will be removed in 2.0.0. UseStatistics.createStats(org.apache.parquet.schema.Type)
instead
-
-
Method Detail
-
updateStats
public void updateStats(Binary value)
Description copied from class:Statistics
updates statistics min and max using the passed value- Overrides:
updateStats
in classStatistics<Binary>
- 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<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:
setMinMaxFromBytes
in 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:Statistics
Abstract method to return the max value as a byte array- Specified by:
getMaxBytes
in classStatistics<Binary>
- 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<Binary>
- 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<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 public void updateStats(Binary min_value, Binary max_value)
Deprecated.useupdateStats(Binary)
, will be removed in 2.0.0- Parameters:
min_value
- a min binarymax_value
- a max binary
-
initializeStats
@Deprecated public void initializeStats(Binary min_value, Binary max_value)
Deprecated.useupdateStats(Binary)
, will be removed in 2.0.0- Parameters:
min_value
- a min binarymax_value
- a max binary
-
genericGetMin
public Binary 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<Binary>
- Returns:
- the min value
-
genericGetMax
public Binary 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<Binary>
- Returns:
- the max value
-
getMax
@Deprecated public Binary getMax()
Deprecated.usegenericGetMax()
, will be removed in 2.0.0- Returns:
- the max binary
-
getMin
@Deprecated public Binary getMin()
Deprecated.usegenericGetMin()
, will be removed in 2.0.0- Returns:
- the min binary
-
setMinMax
@Deprecated public void setMinMax(Binary min, Binary max)
Deprecated.useupdateStats(Binary)
, will be removed in 2.0.0- Parameters:
min
- a min binarymax
- a max binary
-
copy
public BinaryStatistics copy()
- Specified by:
copy
in classStatistics<Binary>
- Returns:
- a new independent statistics instance of this class.
-
-