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


##########
regression-test/suites/statistics/analyze_test.groovy:
##########
@@ -232,4 +232,66 @@ suite("analyze_test") {
     //    exception """errCode = 2, detailMessage = Unexpected exception: 
column stats for analyze_test_col1 is unknown"""
     //}
 
+    sql """
+        insert into __internal_schema.analysis_jobs 
values(788943185,-1,'internal','default_cluster:analyze_test_db_1',
+        'analyze_test_tbl_1', 'analyze_test_col3',-1 
,'MANUAL','sFULL','',0,'PENDING', 'ONCE');
+    """
+
+    sql """
+        DROP EXPIRED STATS
+    """
+
+//    Exception e = null;

Review Comment:
   useless code?



##########
fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsRepository.java:
##########
@@ -87,6 +88,13 @@ public class StatisticsRepository {
     private static final String DROP_TABLE_STATISTICS_TEMPLATE = "DELETE FROM 
" + FeConstants.INTERNAL_DB_NAME
             + "." + "${tblName}" + " WHERE ${condition}";
 
+    private static final String FIND_EXPIRED_JOBS = "SELECT job_id FROM "
+            + FULL_QUALIFIED_ANALYSIS_JOB_TABLE_NAME
+            + " WHERE task_id = -1 AND ${now} - last_exec_time_in_ms  > "

Review Comment:
   what's mean about `task_id = -1`



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