public abstract class Statistics extends Object
Constructor and Description |
---|
Statistics() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Statistics stats)
Equality comparison method to compare two statistics objects.
|
abstract byte[] |
getMaxBytes()
Abstract method to return the max value as a byte array
|
abstract byte[] |
getMinBytes()
Abstract method to return the min value as a byte array
|
long |
getNumNulls()
Returns the null count
|
static Statistics |
getStatsBasedOnType(PrimitiveType.PrimitiveTypeName type)
Returns the typed statistics object based on the passed type parameter
|
int |
hashCode()
Hash code for the statistics object
|
void |
incrementNumNulls()
Increments the null count by one
|
void |
incrementNumNulls(long increment)
Increments the null count by the parameter value
|
boolean |
isEmpty()
Returns a boolean specifying if the Statistics object is empty,
i.e does not contain valid statistics for the page/column yet
|
protected void |
markAsNotEmpty() |
void |
mergeStatistics(Statistics stats)
Method to merge this statistics object with the object passed
as parameter.
|
protected abstract void |
mergeStatisticsMinMax(Statistics stats)
Abstract method to merge this statistics min and max with the values
of the parameter object.
|
abstract void |
setMinMaxFromBytes(byte[] minBytes,
byte[] maxBytes)
Abstract method to set min and max values from byte arrays.
|
void |
setNumNulls(long nulls)
Sets the number of nulls to the parameter value
|
abstract String |
toString()
toString() to display min, max, num_nulls in a string
|
void |
updateStats(Binary value)
updates statistics min and max using the passed value
|
void |
updateStats(boolean value)
updates statistics min and max using the passed value
|
void |
updateStats(double value)
updates statistics min and max using the passed value
|
void |
updateStats(float value)
updates statistics min and max using the passed value
|
void |
updateStats(int value)
updates statistics min and max using the passed value
|
void |
updateStats(long value)
updates statistics min and max using the passed value
|
public static Statistics getStatsBasedOnType(PrimitiveType.PrimitiveTypeName type)
type
- PrimitiveTypeName type of the columnpublic void updateStats(int value)
value
- value to use to update min and maxpublic void updateStats(long value)
value
- value to use to update min and maxpublic void updateStats(float value)
value
- value to use to update min and maxpublic void updateStats(double value)
value
- value to use to update min and maxpublic void updateStats(boolean value)
value
- value to use to update min and maxpublic void updateStats(Binary value)
value
- value to use to update min and maxpublic boolean equals(Statistics stats)
stats
- Statistics object to compare againstpublic int hashCode()
public void mergeStatistics(Statistics stats)
stats
- Statistics object to merge withprotected abstract void mergeStatisticsMinMax(Statistics stats)
stats
- Statistics object to merge withpublic abstract void setMinMaxFromBytes(byte[] minBytes, byte[] maxBytes)
minBytes
- byte array to set the min value tomaxBytes
- byte array to set the max value topublic abstract byte[] getMaxBytes()
public abstract byte[] getMinBytes()
public abstract String toString()
public void incrementNumNulls()
public void incrementNumNulls(long increment)
increment
- value to increment the null count bypublic long getNumNulls()
public void setNumNulls(long nulls)
nulls
- null count to set the count topublic boolean isEmpty()
protected void markAsNotEmpty()
Copyright © 2015. All rights reserved.