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
ConstructorDescriptionColumnStatistics
(Collection<StatisticsHolder<?>> statistics) ColumnStatistics
(Collection<StatisticsHolder<?>> statistics, TypeProtos.MinorType type) -
Method Summary
Modifier and TypeMethodDescriptioncloneWith
(ColumnStatistics<T> sourceStatistics) Returns newColumnStatistics
instance with overridden statistics taken from specifiedColumnStatistics
.boolean
contains
(StatisticsKind<?> statisticsKind) Checks whether specified statistics kind is set in this column statistics.boolean
containsExact
(StatisticsKind<?> statisticsKind) Checks whether specified statistics kind is set in this column statistics and it corresponds to the exact statistics value.boolean
genericClone
(ColumnStatistics<?> sourceStatistics) <V> V
get
(StatisticsKind<V> statisticsKind) Returns statistics value which corresponds to specifiedStatisticsKind
.ReturnsComparator
for comparing values with the same type as column values.int
hashCode()
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
ReturnsComparator
for comparing values with the same type as column values.- Returns:
Comparator
-
cloneWith
Returns newColumnStatistics
instance with overridden statistics taken from specifiedColumnStatistics
.- Parameters:
sourceStatistics
- source of statistics to override- Returns:
- new
ColumnStatistics
instance with overridden statistics
-
genericClone
-
getComparatorType
-
jsonString
-
equals
-
hashCode
public int hashCode() -
toString
-
of
-