morrySnow commented on code in PR #42209:
URL: https://github.com/apache/doris/pull/42209#discussion_r1811933079


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsAutoCollector.java:
##########
@@ -203,6 +206,13 @@ protected AnalysisInfo createAnalyzeJobForTbl(
         if (StatisticsUtil.enablePartitionAnalyze() && 
table.isPartitionedTable()) {
             analysisMethod = AnalysisMethod.FULL;
         }
+        if (table instanceof OlapTable && 
analysisMethod.equals(AnalysisMethod.SAMPLE)) {
+            OlapTable ot = (OlapTable) table;
+            if (ot.getRowCountForIndex(ot.getBaseIndexId(), true) == -1) {

Review Comment:
   -1 is a magic number, could we use a static variable instead?



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