[fix](nereids) column stats min/max missing (#14091)

in the result of SHOW COLUMN STATS tbl, min/max value is not displayed.
This commit is contained in:
minghong
2022-11-10 17:08:44 +08:00
committed by GitHub
parent 6bd5378f66
commit ae4f2aead7
2 changed files with 3 additions and 3 deletions

View File

@ -227,8 +227,8 @@ public class ColumnStat {
result.add(Double.toString(avgSizeByte));
result.add(Double.toString(maxSizeByte));
result.add(Double.toString(numNulls));
result.add(minExpr == null ? "N/A" : minExpr.toSql());
result.add(maxExpr == null ? "N/A" : maxExpr.toSql());
result.add(Double.toString(minValue));
result.add(Double.toString(maxValue));
return result;
}

View File

@ -85,7 +85,7 @@ public class ColumnStatsTest {
statsTypeToValue.put(StatsType.MAX_VALUE, "1000");
columnStatsUnderTest.updateStats(columnType, statsTypeToValue);
String[] expectedInfo = {"1.0", "8.0", "8.0", "2.0", "0", "1000"};
String[] expectedInfo = {"1.0", "8.0", "8.0", "2.0", "0.0", "1000.0"};
// Run the test
List<String> showInfo = columnStatsUnderTest.getShowInfo();