LiBinfeng-01 commented on code in PR #20716:
URL: https://github.com/apache/doris/pull/20716#discussion_r1268849217


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculator.java:
##########
@@ -549,24 +548,26 @@ private Statistics computeFilter(Filter filter) {
     }
 
     private ColumnStatistic getColumnStatistic(TableIf table, String colName) {
-        if (totalColumnStatisticMap.get(table.getName() + colName) != null) {
-            return totalColumnStatisticMap.get(table.getName() + colName);
-        } else if (isPlayNereidsDump) {
-            return ColumnStatistic.UNKNOWN;
-        } else {
-            long catalogId;
-            long dbId;
-            try {
-                catalogId = table.getDatabase().getCatalog().getId();
-                dbId = table.getDatabase().getId();
-            } catch (Exception e) {
-                // Use -1 for catalog id and db id when failed to get them 
from metadata.
-                // This is OK because catalog id and db id is not in the 
hashcode function of ColumnStatistics cache
-                // and the table id is globally unique.
-                LOG.debug(String.format("Fail to get catalog id and db id for 
table %s", table.getName()));
-                catalogId = -1;
-                dbId = -1;
+        long catalogId;
+        long dbId;
+        try {
+            catalogId = table.getDatabase().getCatalog().getId();
+            dbId = table.getDatabase().getId();
+        } catch (Exception e) {
+            // Use -1 for catalog id and db id when failed to get them from 
metadata.
+            // This is OK because catalog id and db id is not in the hashcode 
function of ColumnStatistics cache
+            // and the table id is globally unique.
+            LOG.debug(String.format("Fail to get catalog id and db id for 
table %s", table.getName()));
+            catalogId = -1;
+            dbId = -1;
+        }
+        if (isPlayNereidsDump) {

Review Comment:
   we do not have Env.getCurrentEnv() when replaying minidump, so it can not 
load to cache



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to