weizhengte commented on code in PR #8860:
URL: https://github.com/apache/incubator-doris/pull/8860#discussion_r844847087


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsManager.java:
##########
@@ -133,7 +139,25 @@ private Table validateTableName(TableName dbTableName) 
throws AnalysisException
         String tableName = dbTableName.getTbl();
 
         Database db = 
Catalog.getCurrentCatalog().getDbOrAnalysisException(dbName);
-        Table table = db.getTableOrAnalysisException(tableName);
-        return table;
+        return db.getTableOrAnalysisException(tableName);
+    }
+
+    public void alterTableStatistics(StatisticsTaskResult taskResult) throws 
AnalysisException {
+        StatsGranularityDesc desc = taskResult.getGranularityDesc();
+        long tableId = desc.getTableId();
+        Map<String, String> statsNameToValue = 
taskResult.getStatsNameToValue();
+        this.statistics.updateTableStats(tableId, statsNameToValue);

Review Comment:
   Yes, I have already checked the relevant information before updating the 
statistics, you can refer to my latest submitted code. We have not implemented 
the cleanup statistics and automatic update statistics in this issue, and will 
be implemented in the next issue.



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