[fix](stats) when some stat is NULL, causing an exception during display stats (#21588)
During manual statistics injection, some statistics may beNULL, causing an exception during display.
This commit is contained in:
@ -192,13 +192,13 @@ public class ColumnStatistic {
|
||||
}
|
||||
String min = resultRow.getColumnValue("min");
|
||||
String max = resultRow.getColumnValue("max");
|
||||
if (min != null) {
|
||||
if (min != null && !min.equalsIgnoreCase("NULL")) {
|
||||
columnStatisticBuilder.setMinValue(StatisticsUtil.convertToDouble(col.getType(), min));
|
||||
columnStatisticBuilder.setMinExpr(StatisticsUtil.readableValue(col.getType(), min));
|
||||
} else {
|
||||
columnStatisticBuilder.setMinValue(Double.MIN_VALUE);
|
||||
}
|
||||
if (max != null) {
|
||||
if (max != null && !max.equalsIgnoreCase("NULL")) {
|
||||
columnStatisticBuilder.setMaxValue(StatisticsUtil.convertToDouble(col.getType(), max));
|
||||
columnStatisticBuilder.setMaxExpr(StatisticsUtil.readableValue(col.getType(), max));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user