Class ColumnStats
- java.lang.Object
-
- org.apache.flink.table.plan.stats.ColumnStats
-
@PublicEvolving public final class ColumnStats extends Object
Column statistics.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classColumnStats.BuilderColumnStats builder.
-
Field Summary
Fields Modifier and Type Field Description static ColumnStatsUNKNOWNUnknown definition for column stats.
-
Constructor Summary
Constructors Constructor Description ColumnStats(Long ndv, Long nullCount, Double avgLen, Integer maxLen, Comparable<?> max, Comparable<?> min)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnStatscopy()Create a deep copy of "this" instance.booleanequals(Object o)DoublegetAvgLen()Comparable<?>getMax()IntegergetMaxLen()Comparable<?>getMin()LonggetNdv()LonggetNullCount()inthashCode()ColumnStatsmerge(ColumnStats other, boolean isPartitionKey)Merges two column stats.StringtoString()
-
-
-
Field Detail
-
UNKNOWN
public static final ColumnStats UNKNOWN
Unknown definition for column stats.
-
-
Constructor Detail
-
ColumnStats
public ColumnStats(Long ndv, Long nullCount, Double avgLen, Integer maxLen, Comparable<?> max, Comparable<?> min)
-
-
Method Detail
-
getNdv
public Long getNdv()
-
getNullCount
public Long getNullCount()
-
getAvgLen
public Double getAvgLen()
-
getMaxLen
public Integer getMaxLen()
-
getMax
public Comparable<?> getMax()
-
getMin
public Comparable<?> getMin()
-
copy
public ColumnStats copy()
Create a deep copy of "this" instance.- Returns:
- a deep copy
-
merge
public ColumnStats merge(ColumnStats other, boolean isPartitionKey)
Merges two column stats. When the stats are unknown, whatever the other are, we need return unknown stats. The unknown definition for column stats is null.- Parameters:
other- The other column stats to merge.- Returns:
- The merged column stats.
-
-