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.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ColumnStatscopy()Create a deep copy of "this" instance.booleanequals(Object o)DoublegetAvgLen()Comparable<?>getMax()Returns null if this instance is constructed byColumnStats(Long, Long, Double, Integer, Number, Number).IntegergetMaxLen()NumbergetMaxValue()Deprecated.Comparable<?>getMin()Returns null if this instance is constructed byColumnStats(Long, Long, Double, Integer, Number, Number).NumbergetMinValue()Deprecated.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
@Deprecated public ColumnStats(Long ndv, Long nullCount, Double avgLen, Integer maxLen, Number max, Number min)
Deprecated.Deprecated because Number type max/min is not well supported comparable type, e.g.Date,Timestamp. please useColumnStats.Builderto construct ColumnStats instance.
-
-
Method Detail
-
getNdv
public Long getNdv()
-
getNullCount
public Long getNullCount()
-
getAvgLen
public Double getAvgLen()
-
getMaxLen
public Integer getMaxLen()
-
getMaxValue
@Deprecated public Number getMaxValue()
Deprecated.Deprecated because Number type max/min is not well supported comparable type, e.g.Date,Timestamp.Returns null if this instance is constructed by
ColumnStats.Builder.
-
getMax
public Comparable<?> getMax()
Returns null if this instance is constructed byColumnStats(Long, Long, Double, Integer, Number, Number).
-
getMinValue
@Deprecated public Number getMinValue()
Deprecated.Deprecated because Number type max/min is not well supported comparable type, e.g.Date,Timestamp.Returns null if this instance is constructed by
ColumnStats.Builder.
-
getMin
public Comparable<?> getMin()
Returns null if this instance is constructed byColumnStats(Long, Long, Double, Integer, Number, Number).
-
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.
-
-