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 class
ColumnStats.Builder
ColumnStats builder.
-
Field Summary
Fields Modifier and Type Field Description static ColumnStats
UNKNOWN
Unknown definition for column stats.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ColumnStats
copy()
Create a deep copy of "this" instance.boolean
equals(Object o)
Double
getAvgLen()
Comparable<?>
getMax()
Returns null if this instance is constructed byColumnStats(Long, Long, Double, Integer, Number, Number)
.Integer
getMaxLen()
Number
getMaxValue()
Deprecated.Comparable<?>
getMin()
Returns null if this instance is constructed byColumnStats(Long, Long, Double, Integer, Number, Number)
.Number
getMinValue()
Deprecated.Long
getNdv()
Long
getNullCount()
int
hashCode()
ColumnStats
merge(ColumnStats other, boolean isPartitionKey)
Merges two column stats.String
toString()
-
-
-
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.Builder
to 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.
-
-