github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/function/func_purge_log.result (about) 1 drop account if exists bvt_purge_log; 2 create account bvt_purge_log admin_name 'admin' identified by '111'; 3 select purge_log('rawlog', '2023-06-30') a; 4 not supported: only support sys account 5 select purge_log('rawlog', '2023-06-30') a; 6 a 7 0 8 select purge_log('statement_info', '2023-06-30') a; 9 a 10 0 11 select purge_log('metric', '2023-06-30') a; 12 a 13 0 14 select purge_log('rawlog,statement_info,metric', '2023-06-30') a; 15 a 16 0 17 select purge_log('rawlog_not_exist', '2023-06-30') a; 18 not supported: purge 'rawlog_not_exist' 19 select purge_log('rawlog_not_exist', '123') a; 20 invalid argument parsedate, bad value 123 21 select purge_log('rawlog_not_exist', NULL) a; 22 a 23 NULL 24 select purge_log(NULL, '2023-06-30') a; 25 a 26 NULL 27 select purge_log(NULL, NULL) a; 28 a 29 NULL 30 set @ts=(select max(collecttime) from system_metrics.metric); 31 set @metric_name=(select metric_name from system_metrics.metric where collecttime between @ts and date_add(@ts, interval 1 second) limit 1); 32 set @node=(select node from system_metrics.metric where collecttime between @ts and date_add(@ts, interval 1 second) and metric_name=@metric_name limit 1); 33 select purge_log('statement_info,metric', DATE_ADD( @ts, interval 1 day)) a; 34 a 35 0 36 select count(1) cnt, @ts, @metric_name, @node from system_metrics.metric where collecttime between @ts and date_add(@ts, interval 1 second) and metric_name=@metric_name and node=@node; 37 cnt @ts @metric_name @node 38 0 date time any_value any_value 39 drop account if exists bvt_purge_log;