From fceebf645987376c225f6f6b20828250d736c713 Mon Sep 17 00:00:00 2001 From: airborne12 Date: Wed, 17 Jul 2024 14:19:03 +0800 Subject: [PATCH] [Regression](inverted index) fix build index case for cloud mode (#37962) ## Proposed changes Build index is not support in cloud mode. Fix the cases. --- .../test_add_drop_index_on_table_with_mv.groovy | 9 +++++---- .../index_change/test_add_drop_index_repeatly.groovy | 10 ++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/regression-test/suites/inverted_index_p0/index_change/test_add_drop_index_on_table_with_mv.groovy b/regression-test/suites/inverted_index_p0/index_change/test_add_drop_index_on_table_with_mv.groovy index 7b63521178e289..98729dbc91b1ea 100644 --- a/regression-test/suites/inverted_index_p0/index_change/test_add_drop_index_on_table_with_mv.groovy +++ b/regression-test/suites/inverted_index_p0/index_change/test_add_drop_index_on_table_with_mv.groovy @@ -128,8 +128,9 @@ suite("test_add_drop_index_on_table_with_mv") { assertEquals(show_result[0][2], "idx1") // build index - sql """ BUILD INDEX idx1 ON ${tableName}; """ - - // wait for index build finish - wait_for_build_index_on_partition_finish(tableName, timeout) + if (!isCloudMode()) { + sql """ BUILD INDEX idx1 ON ${tableName}; """ + // wait for index build finish + wait_for_build_index_on_partition_finish(tableName, timeout) + } } diff --git a/regression-test/suites/inverted_index_p0/index_change/test_add_drop_index_repeatly.groovy b/regression-test/suites/inverted_index_p0/index_change/test_add_drop_index_repeatly.groovy index 33b6fc1c922911..00a5a8720f5324 100644 --- a/regression-test/suites/inverted_index_p0/index_change/test_add_drop_index_repeatly.groovy +++ b/regression-test/suites/inverted_index_p0/index_change/test_add_drop_index_repeatly.groovy @@ -70,10 +70,12 @@ suite("test_add_drop_index_repeatly"){ for (def i = 1; i <= 10; i++) { // create index on table sql """ create index idx_k2 on ${tbl}(k2) using inverted """ - // build index - sql """ build index idx_k2 on ${tbl} """ - def state = wait_for_last_build_index_on_table_finish(tbl, timeout) - assertEquals(state, "FINISHED") + if (!isCloudMode()) { + // build index + sql """ build index idx_k2 on ${tbl} """ + def state = wait_for_last_build_index_on_table_finish(tbl, timeout) + assertEquals(state, "FINISHED") + } sql """ drop index idx_k2 on ${tbl} """ } }