Jibing-Li commented on code in PR #32792:
URL: https://github.com/apache/doris/pull/32792#discussion_r1540428241


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/TableStatsMeta.java:
##########
@@ -159,21 +151,27 @@ public void update(AnalysisInfo analyzedJob, TableIf 
tableIf) {
             if (tableIf instanceof OlapTable) {
                 rowCount = analyzedJob.emptyJob ? 0 : tableIf.getRowCount();
             }
-            if (!analyzedJob.emptyJob && analyzedJob.colToPartitions.keySet()
-                    .containsAll(tableIf.getBaseSchema().stream()
-                            .filter(c -> 
!StatisticsUtil.isUnsupportedType(c.getType()))
-                            
.map(Column::getName).collect(Collectors.toSet()))) {
+            if (analyzedJob.emptyJob) {
+                return;
+            }
+            if (analyzedJob.jobColumnList.containsAll(
+                    tableIf.getColumnIndexPairList(
+                    
tableIf.getSchemaAllIndexes(false).stream().map(Column::getName).collect(Collectors.toSet()))))
 {
                 updatedRows.set(0);
                 newPartitionLoaded.set(false);
             }
             if (tableIf instanceof OlapTable) {
                 PartitionInfo partitionInfo = ((OlapTable) 
tableIf).getPartitionInfo();
-                if (partitionInfo != null && 
analyzedJob.colToPartitions.keySet()
-                        
.containsAll(partitionInfo.getPartitionColumns().stream()
-                            
.map(Column::getName).collect(Collectors.toSet()))) {
+                if (partitionInfo != null && analyzedJob.jobColumnList
+                        
.containsAll(tableIf.getColumnIndexPairList(partitionInfo.getPartitionColumns().stream()
+                            
.map(Column::getName).collect(Collectors.toSet())))) {
                     newPartitionLoaded.set(false);
                 }
             }
         }
     }
+
+    public void convertDeprecatedColStatsToNewVersion() {
+        deprecatedColNameToColStatsMeta = null;
+    }

Review Comment:
   I don't feel it's worth to implement this. The older version only have table 
id in memory, so it's not easy to find the table during replay metadata, we 
need to go through all catalogs->dbs to find it. 
   The downside of not implementing this is auto analyze need to collect stats 
for all tables. But the old stats already collected are still available.



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to