This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 3b76428de9 [fix](stats) when some stat is NULL, causing an exception 
during display stats (#21588)
3b76428de9 is described below

commit 3b76428de9bedee53fc836831014c1f0bfaef39c
Author: ElvinWei <zhengte....@outlook.com>
AuthorDate: Wed Jul 12 14:57:06 2023 +0800

    [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.
---
 .../src/main/java/org/apache/doris/statistics/ColumnStatistic.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatistic.java 
b/fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatistic.java
index 744c4af7a0..48277b3c51 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatistic.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatistic.java
@@ -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 {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to