godfreyhe commented on a change in pull request #10196: [FLINK-14789]
[table-planner-blink] extends max/min type in ColumnStats from Number to
Comparable
URL: https://github.com/apache/flink/pull/10196#discussion_r347358392
##########
File path:
flink-table/flink-table-common/src/main/java/org/apache/flink/table/plan/stats/ColumnStats.java
##########
@@ -115,20 +189,81 @@ public String toString() {
if (max != null) {
columnStats.add("max=" + max);
}
+ if (maxValue != null) {
+ columnStats.add("max=" + maxValue);
+ }
if (min != null) {
columnStats.add("min=" + min);
}
+ if (minValue != null) {
+ columnStats.add("min=" + minValue);
+ }
String columnStatsStr = String.join(", ", columnStats);
return "ColumnStats(" + columnStatsStr + ")";
}
/**
* Create a deep copy of "this" instance.
+ *
* @return a deep copy
*/
public ColumnStats copy() {
- return new ColumnStats(this.ndv, this.nullCount, this.avgLen,
this.maxLen,
- this.max, this.min);
+ if (maxValue != null) {
Review comment:
`minValue != null` missing, full condition should be `maxValue != null ||
minValue != null`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services