You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2023/04/25 07:36:04 UTC
[doris] branch master updated: [optimize](regression case) Optimizing some regression case of inverted index (#19032)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new d5c82b2ea0 [optimize](regression case) Optimizing some regression case of inverted index (#19032)
d5c82b2ea0 is described below
commit d5c82b2ea0d2973a08294f03916dc94d8d338119
Author: YueW <45...@users.noreply.github.com>
AuthorDate: Tue Apr 25 15:35:56 2023 +0800
[optimize](regression case) Optimizing some regression case of inverted index (#19032)
---
.../inverted_index_p0/test_add_drop_index.groovy | 16 +++----
.../test_add_drop_index_ignore_case_column.groovy | 2 +-
.../test_add_drop_index_with_data.groovy | 2 +-
.../test_add_drop_index_with_delete_data.groovy | 2 +-
.../test_index_like_select.groovy | 48 +++++++++------------
.../test_index_match_term_and_phrase_select.groovy | 48 +++++++++------------
.../test_index_range_between_select.groovy | 50 ++++++++++------------
.../test_index_range_in_select.groovy | 48 +++++++++------------
.../test_index_range_not_in_select.groovy | 48 +++++++++------------
9 files changed, 116 insertions(+), 148 deletions(-)
diff --git a/regression-test/suites/inverted_index_p0/test_add_drop_index.groovy b/regression-test/suites/inverted_index_p0/test_add_drop_index.groovy
index da4152c752..243f05ec2d 100644
--- a/regression-test/suites/inverted_index_p0/test_add_drop_index.groovy
+++ b/regression-test/suites/inverted_index_p0/test_add_drop_index.groovy
@@ -34,7 +34,7 @@ suite("test_add_drop_index", "inverted_index"){
useTime = t
sleep(delta_time)
}
- assertTrue(useTime <= OpTimeout)
+ assertTrue(useTime <= OpTimeout, "wait_for_latest_op_on_table_finish timeout")
}
def indexTbName1 = "test_add_drop_inverted_index"
@@ -93,14 +93,13 @@ suite("test_add_drop_index", "inverted_index"){
assertEquals(show_result[1][2], "age_idx_diff")
// case1.4 drop index
- def drop_result = sql "drop index age_idx on ${indexTbName1}"
- logger.info("drop index age_idx on " + indexTbName1 + "; result: " + drop_result)
+ def drop_result = sql """
+ ALTER TABLE ${indexTbName1}
+ drop index age_idx,
+ drop index age_idx_diff;
+ """
+ logger.info("drop index age_idx and age_idx_diff on " + indexTbName1 + "; result: " + drop_result)
wait_for_latest_op_on_table_finish(indexTbName1, timeout)
-
- drop_result = sql "drop index age_idx_diff on ${indexTbName1}"
- logger.info("drop index age_idx_diff on " + indexTbName1 + "; result: " + drop_result)
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
-
show_result = sql "show index from ${indexTbName1}"
assertEquals(show_result.size(), 0)
@@ -115,7 +114,6 @@ suite("test_add_drop_index", "inverted_index"){
assertEquals(drop_index_twice_result, "fail")
// case2: create index for date colume
- // case2.1 create index for date colume
sql "create index date_idx on ${indexTbName1}(`registDate`) using inverted"
wait_for_latest_op_on_table_finish(indexTbName1, timeout)
show_result = sql "show index from ${indexTbName1}"
diff --git a/regression-test/suites/inverted_index_p0/test_add_drop_index_ignore_case_column.groovy b/regression-test/suites/inverted_index_p0/test_add_drop_index_ignore_case_column.groovy
index aee3170f3c..a68cd2c59e 100644
--- a/regression-test/suites/inverted_index_p0/test_add_drop_index_ignore_case_column.groovy
+++ b/regression-test/suites/inverted_index_p0/test_add_drop_index_ignore_case_column.groovy
@@ -34,7 +34,7 @@ suite("test_add_drop_index_with_ignore_case_column", "inverted_index"){
useTime = t
sleep(delta_time)
}
- assertTrue(useTime <= OpTimeout)
+ assertTrue(useTime <= OpTimeout, "wait_for_latest_op_on_table_finish timeout")
}
def indexTbName1 = "test_add_drop_inverted_index4"
diff --git a/regression-test/suites/inverted_index_p0/test_add_drop_index_with_data.groovy b/regression-test/suites/inverted_index_p0/test_add_drop_index_with_data.groovy
index c96b9d3ddb..ec267a3f27 100644
--- a/regression-test/suites/inverted_index_p0/test_add_drop_index_with_data.groovy
+++ b/regression-test/suites/inverted_index_p0/test_add_drop_index_with_data.groovy
@@ -34,7 +34,7 @@ suite("test_add_drop_index_with_data", "inverted_index"){
useTime = t
sleep(delta_time)
}
- assertTrue(useTime <= OpTimeout)
+ assertTrue(useTime <= OpTimeout, "wait_for_latest_op_on_table_finish timeout")
}
def indexTbName1 = "test_add_drop_inverted_index2"
diff --git a/regression-test/suites/inverted_index_p0/test_add_drop_index_with_delete_data.groovy b/regression-test/suites/inverted_index_p0/test_add_drop_index_with_delete_data.groovy
index 241778a3d1..b2c7b3c7ae 100644
--- a/regression-test/suites/inverted_index_p0/test_add_drop_index_with_delete_data.groovy
+++ b/regression-test/suites/inverted_index_p0/test_add_drop_index_with_delete_data.groovy
@@ -34,7 +34,7 @@ suite("test_add_drop_index_with_delete_data", "inverted_index"){
useTime = t
sleep(delta_time)
}
- assertTrue(useTime <= OpTimeout)
+ assertTrue(useTime <= OpTimeout, "wait_for_latest_op_on_table_finish timeout")
}
def indexTbName1 = "test_add_drop_inverted_index3"
diff --git a/regression-test/suites/inverted_index_p0/test_index_like_select.groovy b/regression-test/suites/inverted_index_p0/test_index_like_select.groovy
index 7be9431e7c..7ae3087ce1 100644
--- a/regression-test/suites/inverted_index_p0/test_index_like_select.groovy
+++ b/regression-test/suites/inverted_index_p0/test_index_like_select.groovy
@@ -44,7 +44,7 @@ suite("test_index_like_select", "inverted_index_select"){
useTime = t
sleep(delta_time)
}
- assertTrue(useTime <= OpTimeout)
+ assertTrue(useTime <= OpTimeout, "wait_for_latest_op_on_table_finish timeout")
}
sql "DROP TABLE IF EXISTS ${indexTbName1}"
@@ -91,36 +91,30 @@ suite("test_index_like_select", "inverted_index_select"){
// case 1
if (i > 0) {
logger.info("it's " + i + " times select, not first select, drop all index before select again")
- sql """ drop index ${varchar_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${varchar_colume2}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${varchar_colume3}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${int_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${string_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${char_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${text_colume1}_idx on ${indexTbName1} """
+ sql """
+ ALTER TABLE ${indexTbName1}
+ drop index ${varchar_colume1}_idx,
+ drop index ${varchar_colume2}_idx,
+ drop index ${varchar_colume3}_idx,
+ drop index ${int_colume1}_idx,
+ drop index ${string_colume1}_idx,
+ drop index ${char_colume1}_idx,
+ drop index ${text_colume1}_idx;
+ """
wait_for_latest_op_on_table_finish(indexTbName1, timeout)
// readd index
logger.info("it's " + i + " times select, readd all index before select again")
- sql """ create index ${varchar_colume1}_idx on ${indexTbName1}(`${varchar_colume1}`) USING INVERTED COMMENT '${varchar_colume1} index'"""
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${varchar_colume2}_idx on ${indexTbName1}(`${varchar_colume2}`) USING INVERTED PROPERTIES("parser"="none") COMMENT '${varchar_colume2} index'"""
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${varchar_colume3}_idx on ${indexTbName1}(`${varchar_colume3}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT ' ${varchar_colume3} index'"""
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${int_colume1}_idx on ${indexTbName1}(`${int_colume1}`) USING INVERTED COMMENT '${int_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${string_colume1}_idx on ${indexTbName1}(`${string_colume1}`) USING INVERTED PROPERTIES("parser"="english") COMMENT '${string_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${char_colume1}_idx on ${indexTbName1}(`${char_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${char_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${text_colume1}_idx on ${indexTbName1}(`${text_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${text_colume1} index' """
+ sql """
+ ALTER TABLE ${indexTbName1}
+ add index ${varchar_colume1}_idx(`${varchar_colume1}`) USING INVERTED COMMENT '${varchar_colume1} index',
+ add index ${varchar_colume2}_idx(`${varchar_colume2}`) USING INVERTED PROPERTIES("parser"="none") COMMENT '${varchar_colume2} index',
+ add index ${varchar_colume3}_idx(`${varchar_colume3}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT ' ${varchar_colume3} index',
+ add index ${int_colume1}_idx(`${int_colume1}`) USING INVERTED COMMENT '${int_colume1} index',
+ add index ${string_colume1}_idx(`${string_colume1}`) USING INVERTED PROPERTIES("parser"="english") COMMENT '${string_colume1} index',
+ add index ${char_colume1}_idx(`${char_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${char_colume1} index',
+ add index ${text_colume1}_idx(`${text_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${text_colume1} index';
+ """
wait_for_latest_op_on_table_finish(indexTbName1, timeout)
}
diff --git a/regression-test/suites/inverted_index_p0/test_index_match_term_and_phrase_select.groovy b/regression-test/suites/inverted_index_p0/test_index_match_term_and_phrase_select.groovy
index 13f1be3261..d857e6b27f 100644
--- a/regression-test/suites/inverted_index_p0/test_index_match_term_and_phrase_select.groovy
+++ b/regression-test/suites/inverted_index_p0/test_index_match_term_and_phrase_select.groovy
@@ -44,7 +44,7 @@ suite("test_index_match_term_and_phrase_select", "inverted_index_select"){
useTime = t
sleep(delta_time)
}
- assertTrue(useTime <= OpTimeout)
+ assertTrue(useTime <= OpTimeout, "wait_for_latest_op_on_table_finish timeout")
}
sql "DROP TABLE IF EXISTS ${indexTbName1}"
@@ -91,36 +91,30 @@ suite("test_index_match_term_and_phrase_select", "inverted_index_select"){
// case 1
if (i > 0) {
logger.info("it's " + i + " times select, not first select, drop all index before select again")
- sql """ drop index ${varchar_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${varchar_colume2}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${varchar_colume3}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${int_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${string_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${char_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${text_colume1}_idx on ${indexTbName1} """
+ sql """
+ ALTER TABLE ${indexTbName1}
+ drop index ${varchar_colume1}_idx,
+ drop index ${varchar_colume2}_idx,
+ drop index ${varchar_colume3}_idx,
+ drop index ${int_colume1}_idx,
+ drop index ${string_colume1}_idx,
+ drop index ${char_colume1}_idx,
+ drop index ${text_colume1}_idx;
+ """
wait_for_latest_op_on_table_finish(indexTbName1, timeout)
// readd index
logger.info("it's " + i + " times select, readd all index before select again")
- sql """ create index ${varchar_colume1}_idx on ${indexTbName1}(`${varchar_colume1}`) USING INVERTED PROPERTIES("parser"="english") COMMENT '${varchar_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${varchar_colume2}_idx on ${indexTbName1}(`${varchar_colume2}`) USING INVERTED PROPERTIES("parser"="none") COMMENT '${varchar_colume2} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${varchar_colume3}_idx on ${indexTbName1}(`${varchar_colume3}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT ' ${varchar_colume3} index'"""
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${int_colume1}_idx on ${indexTbName1}(`${int_colume1}`) USING INVERTED COMMENT '${int_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${string_colume1}_idx on ${indexTbName1}(`${string_colume1}`) USING INVERTED PROPERTIES("parser"="english") COMMENT '${string_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${char_colume1}_idx on ${indexTbName1}(`${char_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${char_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${text_colume1}_idx on ${indexTbName1}(`${text_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${text_colume1} index' """
+ sql """
+ ALTER TABLE ${indexTbName1}
+ add index ${varchar_colume1}_idx(`${varchar_colume1}`) USING INVERTED PROPERTIES("parser"="english") COMMENT '${varchar_colume1} index',
+ add index ${varchar_colume2}_idx(`${varchar_colume2}`) USING INVERTED PROPERTIES("parser"="none") COMMENT '${varchar_colume2} index',
+ add index ${varchar_colume3}_idx(`${varchar_colume3}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT ' ${varchar_colume3} index',
+ add index ${int_colume1}_idx(`${int_colume1}`) USING INVERTED COMMENT '${int_colume1} index',
+ add index ${string_colume1}_idx(`${string_colume1}`) USING INVERTED PROPERTIES("parser"="english") COMMENT '${string_colume1} index',
+ add index ${char_colume1}_idx(`${char_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${char_colume1} index',
+ add index ${text_colume1}_idx(`${text_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${text_colume1} index';
+ """
wait_for_latest_op_on_table_finish(indexTbName1, timeout)
}
diff --git a/regression-test/suites/inverted_index_p0/test_index_range_between_select.groovy b/regression-test/suites/inverted_index_p0/test_index_range_between_select.groovy
index 80a2ae7bc4..c93191973c 100644
--- a/regression-test/suites/inverted_index_p0/test_index_range_between_select.groovy
+++ b/regression-test/suites/inverted_index_p0/test_index_range_between_select.groovy
@@ -44,7 +44,7 @@ suite("test_index_range_between_select", "inverted_index_select"){
useTime = t
sleep(delta_time)
}
- assertTrue(useTime <= OpTimeout)
+ assertTrue(useTime <= OpTimeout, "wait_for_latest_op_on_table_finish timeout")
}
sql "DROP TABLE IF EXISTS ${indexTbName1}"
@@ -91,36 +91,30 @@ suite("test_index_range_between_select", "inverted_index_select"){
// case 1
if (i > 0) {
logger.info("it's " + i + " times select, not first select, drop all index before select again")
- sql """ drop index ${varchar_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${varchar_colume2}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${varchar_colume3}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${int_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${string_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${char_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${text_colume1}_idx on ${indexTbName1} """
+ sql """
+ ALTER TABLE ${indexTbName1}
+ drop index ${varchar_colume1}_idx,
+ drop index ${varchar_colume2}_idx,
+ drop index ${varchar_colume3}_idx,
+ drop index ${int_colume1}_idx,
+ drop index ${string_colume1}_idx,
+ drop index ${char_colume1}_idx,
+ drop index ${text_colume1}_idx;
+ """
wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- // recreate index
+ // readd index
logger.info("it's " + i + " times select, readd all index before select again")
- sql """ create index ${varchar_colume1}_idx on ${indexTbName1}(`${varchar_colume1}`) USING INVERTED COMMENT '${varchar_colume1} index'"""
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${varchar_colume2}_idx on ${indexTbName1}(`${varchar_colume2}`) USING INVERTED PROPERTIES("parser"="none") COMMENT '${varchar_colume2} index'"""
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${varchar_colume3}_idx on ${indexTbName1}(`${varchar_colume3}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT ' ${varchar_colume3} index'"""
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${int_colume1}_idx on ${indexTbName1}(`${int_colume1}`) USING INVERTED COMMENT '${int_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${string_colume1}_idx on ${indexTbName1}(`${string_colume1}`) USING INVERTED PROPERTIES("parser"="english") COMMENT '${string_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${char_colume1}_idx on ${indexTbName1}(`${char_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${char_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${text_colume1}_idx on ${indexTbName1}(`${text_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${text_colume1} index' """
+ sql """
+ ALTER TABLE ${indexTbName1}
+ add index ${varchar_colume1}_idx(`${varchar_colume1}`) USING INVERTED COMMENT '${varchar_colume1} index',
+ add index ${varchar_colume2}_idx(`${varchar_colume2}`) USING INVERTED PROPERTIES("parser"="none") COMMENT '${varchar_colume2} index',
+ add index ${varchar_colume3}_idx(`${varchar_colume3}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT ' ${varchar_colume3} index',
+ add index ${int_colume1}_idx(`${int_colume1}`) USING INVERTED COMMENT '${int_colume1} index',
+ add index ${string_colume1}_idx(`${string_colume1}`) USING INVERTED PROPERTIES("parser"="english") COMMENT '${string_colume1} index',
+ add index ${char_colume1}_idx(`${char_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${char_colume1} index',
+ add index ${text_colume1}_idx(`${text_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${text_colume1} index';
+ """
wait_for_latest_op_on_table_finish(indexTbName1, timeout)
}
diff --git a/regression-test/suites/inverted_index_p0/test_index_range_in_select.groovy b/regression-test/suites/inverted_index_p0/test_index_range_in_select.groovy
index 1372dc9a6c..49ce39e26c 100644
--- a/regression-test/suites/inverted_index_p0/test_index_range_in_select.groovy
+++ b/regression-test/suites/inverted_index_p0/test_index_range_in_select.groovy
@@ -82,7 +82,7 @@ suite("test_index_range_in_select", "inverted_index_select"){
useTime = t
sleep(delta_time)
}
- assertTrue(useTime <= OpTimeout)
+ assertTrue(useTime <= OpTimeout, "wait_for_latest_op_on_table_finish timeout")
}
for (int i = 0; i < 2; i++) {
@@ -90,36 +90,30 @@ suite("test_index_range_in_select", "inverted_index_select"){
// case 1
if (i > 0) {
logger.info("it's " + i + " times select, not first select, drop all index before select again")
- sql """ drop index ${varchar_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${varchar_colume2}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${varchar_colume3}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${int_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${string_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${char_colume1}_idx on ${indexTbName1} """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ drop index ${text_colume1}_idx on ${indexTbName1} """
+ sql """
+ ALTER TABLE ${indexTbName1}
+ drop index ${varchar_colume1}_idx,
+ drop index ${varchar_colume2}_idx,
+ drop index ${varchar_colume3}_idx,
+ drop index ${int_colume1}_idx,
+ drop index ${string_colume1}_idx,
+ drop index ${char_colume1}_idx,
+ drop index ${text_colume1}_idx;
+ """
wait_for_latest_op_on_table_finish(indexTbName1, timeout)
// readd index
logger.info("it's " + i + " times select, readd all index before select again")
- sql """ create index ${varchar_colume1}_idx on ${indexTbName1}(`${varchar_colume1}`) USING INVERTED COMMENT '${varchar_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${varchar_colume2}_idx on ${indexTbName1}(`${varchar_colume2}`) USING INVERTED PROPERTIES("parser"="none") COMMENT '${varchar_colume2} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${varchar_colume3}_idx on ${indexTbName1}(`${varchar_colume3}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT ' ${varchar_colume3} index'"""
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${int_colume1}_idx on ${indexTbName1}(`${int_colume1}`) USING INVERTED COMMENT '${int_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${string_colume1}_idx on ${indexTbName1}(`${string_colume1}`) USING INVERTED PROPERTIES("parser"="english") COMMENT '${string_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${char_colume1}_idx on ${indexTbName1}(`${char_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${char_colume1} index' """
- wait_for_latest_op_on_table_finish(indexTbName1, timeout)
- sql """ create index ${text_colume1}_idx on ${indexTbName1}(`${text_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${text_colume1} index' """
+ sql """
+ ALTER TABLE ${indexTbName1}
+ add index ${varchar_colume1}_idx(`${varchar_colume1}`) USING INVERTED COMMENT '${varchar_colume1} index',
+ add index ${varchar_colume2}_idx(`${varchar_colume2}`) USING INVERTED PROPERTIES("parser"="none") COMMENT '${varchar_colume2} index',
+ add index ${varchar_colume3}_idx(`${varchar_colume3}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT ' ${varchar_colume3} index',
+ add index ${int_colume1}_idx(`${int_colume1}`) USING INVERTED COMMENT '${int_colume1} index',
+ add index ${string_colume1}_idx(`${string_colume1}`) USING INVERTED PROPERTIES("parser"="english") COMMENT '${string_colume1} index',
+ add index ${char_colume1}_idx(`${char_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${char_colume1} index',
+ add index ${text_colume1}_idx(`${text_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${text_colume1} index';
+ """
wait_for_latest_op_on_table_finish(indexTbName1, timeout)
}
diff --git a/regression-test/suites/inverted_index_p0/test_index_range_not_in_select.groovy b/regression-test/suites/inverted_index_p0/test_index_range_not_in_select.groovy
index dd4f33b7ec..319e1b5d15 100644
--- a/regression-test/suites/inverted_index_p0/test_index_range_not_in_select.groovy
+++ b/regression-test/suites/inverted_index_p0/test_index_range_not_in_select.groovy
@@ -88,7 +88,7 @@ suite("test_index_range_not_in_select", "inverted_index_select"){
useTime = t
sleep(delta_time)
}
- assertTrue(useTime <= OpTimeout)
+ assertTrue(useTime <= OpTimeout, "wait_for_latest_op_on_table_finish timeout")
}
for (int i = 0; i < 2; i++) {
@@ -96,36 +96,30 @@ suite("test_index_range_not_in_select", "inverted_index_select"){
// case 1
if (i > 0) {
logger.info("it's " + i + " times select, not first select, drop all index before select again")
- sql """ drop index ${varchar_colume1}_idx on ${Tb_name} """
- wait_for_latest_op_on_table_finish(Tb_name, timeout)
- sql """ drop index ${varchar_colume2}_idx on ${Tb_name} """
- wait_for_latest_op_on_table_finish(Tb_name, timeout)
- sql """ drop index ${varchar_colume3}_idx on ${Tb_name} """
- wait_for_latest_op_on_table_finish(Tb_name, timeout)
- sql """ drop index ${int_colume1}_idx on ${Tb_name} """
- wait_for_latest_op_on_table_finish(Tb_name, timeout)
- sql """ drop index ${string_colume1}_idx on ${Tb_name} """
- wait_for_latest_op_on_table_finish(Tb_name, timeout)
- sql """ drop index ${char_colume1}_idx on ${Tb_name} """
- wait_for_latest_op_on_table_finish(Tb_name, timeout)
- sql """ drop index ${text_colume1}_idx on ${Tb_name} """
+ sql """
+ ALTER TABLE ${Tb_name}
+ drop index ${varchar_colume1}_idx,
+ drop index ${varchar_colume2}_idx,
+ drop index ${varchar_colume3}_idx,
+ drop index ${int_colume1}_idx,
+ drop index ${string_colume1}_idx,
+ drop index ${char_colume1}_idx,
+ drop index ${text_colume1}_idx;
+ """
wait_for_latest_op_on_table_finish(Tb_name, timeout)
// readd index
logger.info("it's " + i + " times select, readd all index before select again")
- sql """ create index ${varchar_colume1}_idx on ${Tb_name}(`${varchar_colume1}`) USING INVERTED COMMENT '${varchar_colume1} index'"""
- wait_for_latest_op_on_table_finish(Tb_name, timeout)
- sql """ create index ${varchar_colume2}_idx on ${Tb_name}(`${varchar_colume2}`) USING INVERTED PROPERTIES("parser"="none") COMMENT '${varchar_colume2} index'"""
- wait_for_latest_op_on_table_finish(Tb_name, timeout)
- sql """ create index ${varchar_colume3}_idx on ${Tb_name}(`${varchar_colume3}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT ' ${varchar_colume3} index'"""
- wait_for_latest_op_on_table_finish(Tb_name, timeout)
- sql """ create index ${int_colume1}_idx on ${Tb_name}(`${int_colume1}`) USING INVERTED COMMENT '${int_colume1} index' """
- wait_for_latest_op_on_table_finish(Tb_name, timeout)
- sql """ create index ${string_colume1}_idx on ${Tb_name}(`${string_colume1}`) USING INVERTED PROPERTIES("parser"="english") COMMENT '${string_colume1} index' """
- wait_for_latest_op_on_table_finish(Tb_name, timeout)
- sql """ create index ${char_colume1}_idx on ${Tb_name}(`${char_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${char_colume1} index' """
- wait_for_latest_op_on_table_finish(Tb_name, timeout)
- sql """ create index ${text_colume1}_idx on ${Tb_name}(`${text_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${text_colume1} index' """
+ sql """
+ ALTER TABLE ${Tb_name}
+ add index ${varchar_colume1}_idx(`${varchar_colume1}`) USING INVERTED COMMENT '${varchar_colume1} index',
+ add index ${varchar_colume2}_idx(`${varchar_colume2}`) USING INVERTED PROPERTIES("parser"="none") COMMENT '${varchar_colume2} index',
+ add index ${varchar_colume3}_idx(`${varchar_colume3}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT ' ${varchar_colume3} index',
+ add index ${int_colume1}_idx(`${int_colume1}`) USING INVERTED COMMENT '${int_colume1} index',
+ add index ${string_colume1}_idx(`${string_colume1}`) USING INVERTED PROPERTIES("parser"="english") COMMENT '${string_colume1} index',
+ add index ${char_colume1}_idx(`${char_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${char_colume1} index',
+ add index ${text_colume1}_idx(`${text_colume1}`) USING INVERTED PROPERTIES("parser"="standard") COMMENT '${text_colume1} index';
+ """
wait_for_latest_op_on_table_finish(Tb_name, timeout)
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org