T - type of column valuespublic class ColumnStatistics<T> extends Object
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 and Description |
|---|
ColumnStatistics(Collection<StatisticsHolder<?>> statistics) |
ColumnStatistics(Collection<StatisticsHolder<?>> statistics,
TypeProtos.MinorType type) |
| Modifier and Type | Method and Description |
|---|---|
ColumnStatistics<T> |
cloneWith(ColumnStatistics<T> sourceStatistics)
Returns new
ColumnStatistics instance with overridden statistics taken from specified ColumnStatistics. |
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 |
equals(Object o) |
ColumnStatistics<T> |
genericClone(ColumnStatistics<?> sourceStatistics) |
<V> V |
get(StatisticsKind<V> statisticsKind)
Returns statistics value which corresponds to specified
StatisticsKind. |
TypeProtos.MinorType |
getComparatorType() |
Comparator<T> |
getValueComparator()
Returns
Comparator for comparing values with the same type as column values. |
int |
hashCode() |
String |
jsonString() |
static ColumnStatistics<?> |
of(String columnStatistics) |
String |
toString() |
public ColumnStatistics(Collection<StatisticsHolder<?>> statistics, TypeProtos.MinorType type)
public ColumnStatistics(Collection<StatisticsHolder<?>> statistics)
public <V> V get(StatisticsKind<V> statisticsKind)
StatisticsKind.statisticsKind - kind of statistics which value should be returnedpublic boolean contains(StatisticsKind<?> statisticsKind)
statisticsKind - statistics kind to checkpublic boolean containsExact(StatisticsKind<?> statisticsKind)
statisticsKind - statistics kind to checkpublic Comparator<T> getValueComparator()
Comparator for comparing values with the same type as column values.Comparatorpublic ColumnStatistics<T> cloneWith(ColumnStatistics<T> sourceStatistics)
ColumnStatistics instance with overridden statistics taken from specified ColumnStatistics.sourceStatistics - source of statistics to overrideColumnStatistics instance with overridden statisticspublic ColumnStatistics<T> genericClone(ColumnStatistics<?> sourceStatistics)
public TypeProtos.MinorType getComparatorType()
public String jsonString()
public static ColumnStatistics<?> of(String columnStatistics)
Copyright © 2021 The Apache Software Foundation. All rights reserved.