From b13c17de9b4b44a3ff3fd0dc78272b251de93b22 Mon Sep 17 00:00:00 2001 From: minghong Date: Thu, 27 Jun 2024 18:50:16 +0800 Subject: [PATCH] [fix](regression-case) add wait for partition_col_stats case (#36899) ## Proposed changes Issue Number: close #xxx --- .../nereids_p0/stats/partition_col_stats.groovy | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/regression-test/suites/nereids_p0/stats/partition_col_stats.groovy b/regression-test/suites/nereids_p0/stats/partition_col_stats.groovy index 3436b6dd86ea11..9aea3251326ca6 100644 --- a/regression-test/suites/nereids_p0/stats/partition_col_stats.groovy +++ b/regression-test/suites/nereids_p0/stats/partition_col_stats.groovy @@ -36,10 +36,18 @@ suite("partition_col_stats") { """ //run this sql to make stats be cached sql "select * from pt where k1<3;" - sleep(10000) + def pt_data = sql "show data from pt;" + def retry= 0; + while (pt_data[0][4] != '7' && retry < 20) { + pt_data = sql "show data from pt;" + sleep(10000); + retry ++; + print("wait partition row count, retry " + retry +" times\n"); + } + explain{ sql "physical plan select * from pt where k1<3;" contains("stats=4") } - + sql "set global enable_partition_analyze=false;" }