Class ColumnStatistics<T>
java.lang.Object
org.apache.drill.metastore.statistics.ColumnStatistics<T>
- Type Parameters:
T- type of column values
Represents collection of statistics values for specific column.
For example, text representation of
ColumnStatistics for varchar column
is the following:
{
"statistics":[
{"statisticsValue":2.1,"statisticsKind":{"name":"approx_count_distinct"}},
{"statisticsValue":"aaa","statisticsKind":{"exact":true,"name":"minValue"}},
{"statisticsValue":3,"statisticsKind":{"exact":true,"name":"nullsCount"}},
{"statisticsValue":"zzz","statisticsKind":{"exact":true,"name":"maxValue"}}],
"type":"VARCHAR"
}
-
Constructor Summary
ConstructorsConstructorDescriptionColumnStatistics(Collection<StatisticsHolder<?>> statistics) ColumnStatistics(Collection<StatisticsHolder<?>> statistics, TypeProtos.MinorType type) -
Method Summary
Modifier and TypeMethodDescriptioncloneWith(ColumnStatistics<T> sourceStatistics) Returns newColumnStatisticsinstance with overridden statistics taken from specifiedColumnStatistics.booleancontains(StatisticsKind<?> statisticsKind) Checks whether specified statistics kind is set in this column statistics.booleancontainsExact(StatisticsKind<?> statisticsKind) Checks whether specified statistics kind is set in this column statistics and it corresponds to the exact statistics value.booleangenericClone(ColumnStatistics<?> sourceStatistics) <V> Vget(StatisticsKind<V> statisticsKind) Returns statistics value which corresponds to specifiedStatisticsKind.ReturnsComparatorfor comparing values with the same type as column values.inthashCode()static ColumnStatistics<?> toString()
-
Constructor Details
-
ColumnStatistics
-
ColumnStatistics
-
-
Method Details
-
get
Returns statistics value which corresponds to specifiedStatisticsKind.- Parameters:
statisticsKind- kind of statistics which value should be returned- Returns:
- statistics value
-
contains
Checks whether specified statistics kind is set in this column statistics.- Parameters:
statisticsKind- statistics kind to check- Returns:
- true if specified statistics kind is set
-
containsExact
Checks whether specified statistics kind is set in this column statistics and it corresponds to the exact statistics value.- Parameters:
statisticsKind- statistics kind to check- Returns:
- true if value which corresponds to the specified statistics kind is exact
-
getValueComparator
ReturnsComparatorfor comparing values with the same type as column values.- Returns:
Comparator
-
cloneWith
Returns newColumnStatisticsinstance with overridden statistics taken from specifiedColumnStatistics.- Parameters:
sourceStatistics- source of statistics to override- Returns:
- new
ColumnStatisticsinstance with overridden statistics
-
genericClone
-
getComparatorType
-
jsonString
-
equals
-
hashCode
public int hashCode() -
toString
-
of
-