From c8d3202595c06a54531d6f77e2e191bcd9607641 Mon Sep 17 00:00:00 2001 From: lihangyu <15605149486@163.com> Date: Mon, 2 Sep 2024 14:50:48 +0800 Subject: [PATCH] [regression-test](cases) optimize some cases (#40240) #40174 --- be/src/common/config.cpp | 2 +- .../test_variant_index_format_v1.out | 0 .../compaction}/compaction_sparse_column.out | 0 .../compaction}/test_compaction_extract_root.out | 0 .../compaction/test_compaction_uniq_keys_row_store.groovy | 2 +- .../test_variant_index_format_v1.groovy | 3 +-- regression-test/suites/variant_p0/with_index/load.groovy | 3 +-- .../compaction}/compaction_sparse_column.groovy | 2 +- .../compaction}/test_compaction_extract_root.groovy | 2 +- 9 files changed, 6 insertions(+), 8 deletions(-) rename regression-test/data/{inverted_index_p0 => inverted_index_p2}/test_variant_index_format_v1.out (100%) rename regression-test/data/{variant_p0 => variant_p1/compaction}/compaction_sparse_column.out (100%) rename regression-test/data/{variant_p0 => variant_p1/compaction}/test_compaction_extract_root.out (100%) rename regression-test/suites/{inverted_index_p0 => inverted_index_p2}/test_variant_index_format_v1.groovy (99%) rename regression-test/suites/{variant_p0 => variant_p1/compaction}/compaction_sparse_column.groovy (99%) rename regression-test/suites/{variant_p0 => variant_p1/compaction}/test_compaction_extract_root.groovy (99%) diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp index 2d90d57398..b56f1b9719 100644 --- a/be/src/common/config.cpp +++ b/be/src/common/config.cpp @@ -988,7 +988,7 @@ DEFINE_Bool(enable_index_apply_preds_except_leafnode_of_andnode, "true"); DEFINE_mBool(variant_enable_flatten_nested, "false"); DEFINE_mDouble(variant_ratio_of_defaults_as_sparse_column, "1"); -DEFINE_mInt64(variant_threshold_rows_to_estimate_sparse_column, "1000"); +DEFINE_mInt64(variant_threshold_rows_to_estimate_sparse_column, "2048"); DEFINE_mBool(variant_throw_exeception_on_invalid_json, "false"); // block file cache diff --git a/regression-test/data/inverted_index_p0/test_variant_index_format_v1.out b/regression-test/data/inverted_index_p2/test_variant_index_format_v1.out similarity index 100% rename from regression-test/data/inverted_index_p0/test_variant_index_format_v1.out rename to regression-test/data/inverted_index_p2/test_variant_index_format_v1.out diff --git a/regression-test/data/variant_p0/compaction_sparse_column.out b/regression-test/data/variant_p1/compaction/compaction_sparse_column.out similarity index 100% rename from regression-test/data/variant_p0/compaction_sparse_column.out rename to regression-test/data/variant_p1/compaction/compaction_sparse_column.out diff --git a/regression-test/data/variant_p0/test_compaction_extract_root.out b/regression-test/data/variant_p1/compaction/test_compaction_extract_root.out similarity index 100% rename from regression-test/data/variant_p0/test_compaction_extract_root.out rename to regression-test/data/variant_p1/compaction/test_compaction_extract_root.out diff --git a/regression-test/suites/compaction/test_compaction_uniq_keys_row_store.groovy b/regression-test/suites/compaction/test_compaction_uniq_keys_row_store.groovy index 36b460001f..767e1a529c 100644 --- a/regression-test/suites/compaction/test_compaction_uniq_keys_row_store.groovy +++ b/regression-test/suites/compaction/test_compaction_uniq_keys_row_store.groovy @@ -18,7 +18,7 @@ import org.codehaus.groovy.runtime.IOGroovyMethods -suite("test_compaction_uniq_keys_row_store", "nonConcurrent") { +suite("test_compaction_uniq_keys_row_store", "p0") { def realDb = "regression_test_serving_p0" def tableName = realDb + ".compaction_uniq_keys_row_store_regression_test" sql "CREATE DATABASE IF NOT EXISTS ${realDb}" diff --git a/regression-test/suites/inverted_index_p0/test_variant_index_format_v1.groovy b/regression-test/suites/inverted_index_p2/test_variant_index_format_v1.groovy similarity index 99% rename from regression-test/suites/inverted_index_p0/test_variant_index_format_v1.groovy rename to regression-test/suites/inverted_index_p2/test_variant_index_format_v1.groovy index 0cd5b93869..cc44ac2bb3 100644 --- a/regression-test/suites/inverted_index_p0/test_variant_index_format_v1.groovy +++ b/regression-test/suites/inverted_index_p2/test_variant_index_format_v1.groovy @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -suite("test_variant_index_format_v1", "p0") { - +suite("test_variant_index_format_v1", "p2") { def calc_file_crc_on_tablet = { ip, port, tablet -> return curl("GET", String.format("http://%s:%s/api/calc_crc?tablet_id=%s", ip, port, tablet)) } diff --git a/regression-test/suites/variant_p0/with_index/load.groovy b/regression-test/suites/variant_p0/with_index/load.groovy index 93737e8a5b..ba46e7a9ee 100644 --- a/regression-test/suites/variant_p0/with_index/load.groovy +++ b/regression-test/suites/variant_p0/with_index/load.groovy @@ -67,8 +67,7 @@ suite("regression_test_variant_with_index", "nonConcurrent"){ qt_sql_inv_3 """select * from var_with_index where inv match 'hello' and cast(v["a"] as int) > 0 order by k""" sql "truncate table var_with_index" // set back configs - set_be_config.call("variant_ratio_of_defaults_as_sparse_column", "0.95") - set_be_config.call("variant_threshold_rows_to_estimate_sparse_column", "1000") + set_be_config.call("variant_threshold_rows_to_estimate_sparse_column", "2048") // sql "truncate table ${table_name}" sql """insert into var_with_index values(1, '{"a1" : 0, "b1": 3}', 'hello world'), (2, '{"a2" : 123}', 'world'),(3, '{"a3" : 123}', 'hello world')""" sql """insert into var_with_index values(4, '{"b1" : 0, "b2": 3}', 'hello world'), (5, '{"b2" : 123}', 'world'),(6, '{"b3" : 123}', 'hello world')""" diff --git a/regression-test/suites/variant_p0/compaction_sparse_column.groovy b/regression-test/suites/variant_p1/compaction/compaction_sparse_column.groovy similarity index 99% rename from regression-test/suites/variant_p0/compaction_sparse_column.groovy rename to regression-test/suites/variant_p1/compaction/compaction_sparse_column.groovy index 57e6e6ef96..69711018f9 100644 --- a/regression-test/suites/variant_p0/compaction_sparse_column.groovy +++ b/regression-test/suites/variant_p1/compaction/compaction_sparse_column.groovy @@ -17,7 +17,7 @@ import org.codehaus.groovy.runtime.IOGroovyMethods -suite("test_compaction_sparse_column", "nonConcurrent") { +suite("test_compaction_sparse_column", "p1,nonConcurrent") { def tableName = "test_compaction" try { diff --git a/regression-test/suites/variant_p0/test_compaction_extract_root.groovy b/regression-test/suites/variant_p1/compaction/test_compaction_extract_root.groovy similarity index 99% rename from regression-test/suites/variant_p0/test_compaction_extract_root.groovy rename to regression-test/suites/variant_p1/compaction/test_compaction_extract_root.groovy index 43f1048f15..83dc0a559e 100644 --- a/regression-test/suites/variant_p0/test_compaction_extract_root.groovy +++ b/regression-test/suites/variant_p1/compaction/test_compaction_extract_root.groovy @@ -17,7 +17,7 @@ import org.codehaus.groovy.runtime.IOGroovyMethods -suite("test_compaction_extract_root", "nonConcurrent") { +suite("test_compaction_extract_root", "p1,nonConcurrent") { def tableName = "test_t" def backendId_to_backendIP = [:]