Skip to content

Commit 5168cd0

Browse files
committed
fix case
1 parent f254f02 commit 5168cd0

File tree

10 files changed

+20
-28
lines changed

10 files changed

+20
-28
lines changed

regression-test/data/variant_p0/doc_mode/predefine/load.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727

2828
-- !sql --
2929
123.456
30-
456.123
30+
"456.123"
3131
789.123
32-
456.123
32+
"456.123"
3333
123.456
3434
789.123
3535

regression-test/suites/inverted_index_p0/storage_format/test_schema_change_storage_format.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ suite("test_local_schema_change_storge_format", "p0") {
5757
}
5858
}
5959
}
60-
sql """ set default_variant_doc_materialization_min_rows = 0 """
60+
6161
def table_name = "github_events"
6262
sql """DROP TABLE IF EXISTS ${table_name}"""
6363
sql """
6464
CREATE TABLE IF NOT EXISTS ${table_name} (
6565
k bigint,
66-
v variant,
66+
v variant<PROPERTIES("variant_enable_doc_mode"="false")>,
6767
change_column double,
6868
INDEX idx_var(v) USING INVERTED PROPERTIES("parser" = "english") COMMENT ''
6969
)

regression-test/suites/inverted_index_p0/test_show_nested_index_file_http_action_with_variant.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ suite("test_show_nested_index_file_http_action_with_variant", "nonConcurrent,p0"
6767
sql """
6868
CREATE TABLE IF NOT EXISTS ${tableName} (
6969
k bigint,
70-
v variant,
70+
v variant<PROPERTIES("variant_enable_doc_mode" = "false")>,
7171
INDEX idx_var(v) USING INVERTED PROPERTIES("parser" = "english") COMMENT ''
7272
)
7373
DUPLICATE KEY(`k`)

regression-test/suites/variant_p0/doc_mode/predefine/test_prdefine_insert_into_select.groovy

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,7 @@ suite("predefine_insert_into_select_doc_mode", "p0"){
9696
sql """insert into toTable values(1, '{"a": "2025-04-16", "b": 123.123456789012, "c": "2025-04-17T09:09:09Z", "d": 123, "e": "2025-04-19", "f": "2025-04-20", "g": "2025-04-21", "h": "2025-04-22", "i": "2025-04-23", "j": "2025-04-24", "k": "2025-04-25", "l": "2025-04-26", "m": "2025-04-27", "n": "2025-04-28", "o": "2025-04-29", "p": "2025-04-30"}');"""
9797

9898

99-
if (minrowszero) {
100-
sql """ set enable_match_without_inverted_index = false """
101-
} else {
102-
sql """ set enable_match_without_inverted_index = true """
103-
}
99+
sql """ set enable_match_without_inverted_index = true """
104100
sql """ set enable_common_expr_pushdown = true """
105101
order_qt_sql """ select count() from toTable where cast (var['d'] as string) match '123' """
106102
}

regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_schema_change.groovy

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ suite("predefine_schema_change_doc_value", "p0"){
4242
sql """insert into ${tableName} values(1, '{"a": "2025-04-16", "b": 123.123456789012, "c": "2025-04-17T09:09:09Z", "d": 123, "e": "2025-04-19", "f": "2025-04-20", "g": "2025-04-21", "h": "2025-04-22", "i": "2025-04-23", "j": "2025-04-24", "k": "2025-04-25", "l": "2025-04-26", "m": "2025-04-27", "n": "2025-04-28", "o": "2025-04-29", "p": "2025-04-30"}', 'col');"""
4343
sql """insert into ${tableName} values(1, '{"a": "2025-04-16", "b": 123.123456789012, "c": "2025-04-17T09:09:09Z", "d": 123, "e": "2025-04-19", "f": "2025-04-20", "g": "2025-04-21", "h": "2025-04-22", "i": "2025-04-23", "j": "2025-04-24", "k": "2025-04-25", "l": "2025-04-26", "m": "2025-04-27", "n": "2025-04-28", "o": "2025-04-29", "p": "2025-04-30"}', 'col');"""
4444

45-
if (minrowszero) {
46-
sql """ set enable_match_without_inverted_index = false """
47-
} else {
48-
sql """ set enable_match_without_inverted_index = true """
49-
}
45+
sql """ set enable_match_without_inverted_index = true """
5046

5147
sql """ set enable_common_expr_pushdown = true """
5248
qt_sql """ select count() from ${tableName} where cast (var['d'] as string) match '123' """

regression-test/suites/variant_p0/doc_mode/predefine/test_predefine_type_index.groovy

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
suite("variant_predefine_index_doc_value", "p0"){
1919
sql """ set describe_extend_variant_column = true """
20-
sql """ set enable_match_without_inverted_index = false """
2120
sql """ set enable_common_expr_pushdown = true """
2221
sql """ set default_variant_enable_typed_paths_to_sparse = false """
2322
sql """ set default_variant_enable_doc_mode = true """
2423
sql """ set default_variant_doc_materialization_min_rows = 0 """
24+
sql """ set default_variant_doc_hash_shard_count = 1 """
2525

2626
def tableName = "test_variant_predefine_index_type"
2727
sql "DROP TABLE IF EXISTS ${tableName}"
@@ -30,8 +30,7 @@ suite("variant_predefine_index_doc_value", "p0"){
3030
`var` variant <
3131
MATCH_NAME 'path.int' : int,
3232
MATCH_NAME 'path.decimal' : double,
33-
MATCH_NAME 'path.string' : string,
34-
properties("variant_max_subcolumns_count" = "10")
33+
MATCH_NAME 'path.string' : string
3534
> NULL,
3635
INDEX idx_a_b (var) USING INVERTED PROPERTIES("field_pattern"="path.int") COMMENT '',
3736
INDEX idx_a_c (var) USING INVERTED PROPERTIES("field_pattern"="path.decimal") COMMENT '',
@@ -49,7 +48,7 @@ suite("variant_predefine_index_doc_value", "p0"){
4948
sql """ set profile_level = 2"""
5049
sql """ set inverted_index_skip_threshold = 0 """
5150
sql """ set enable_common_expr_pushdown = true """
52-
sql """ set enable_match_without_inverted_index = false """
51+
5352
qt_sql """ select count() from ${tableName} where cast(var['path']['int'] as int) = 789 """
5453
qt_sql """ select count() from ${tableName} where cast(var['path']['decimal'] as DECIMAL(15, 12)) = 789.789123456789 """
5554
qt_sql """ select count() from ${tableName} where var['path']['string'] match 'hello' """
@@ -58,8 +57,10 @@ suite("variant_predefine_index_doc_value", "p0"){
5857
sql """ insert into ${tableName} values(1, '{"path" : {"int" : 123, "decimal" : 123.123456789012, "string" : "hello"}}') """
5958
}
6059

61-
trigger_and_wait_compaction(tableName, "cumulative")
60+
trigger_and_wait_compaction(tableName, "full")
6261

62+
63+
sql """ set enable_match_without_inverted_index = false """
6364
qt_sql """ select variant_type(var) from ${tableName} order by id """
6465
qt_sql """select * from ${tableName} order by id"""
6566
qt_sql """ select count() from ${tableName} where cast(var['path']['int'] as int) = 789 """
@@ -73,8 +74,7 @@ suite("variant_predefine_index_doc_value", "p0"){
7374
`id` int NOT NULL,
7475
`overflow_properties` variant<
7576
MATCH_NAME 'color' : text,
76-
MATCH_NAME 'tags' : array<string>,
77-
properties("variant_max_subcolumns_count" = "10")
77+
MATCH_NAME 'tags' : array<string>
7878
> NULL,
7979
INDEX idx1 (`overflow_properties`) USING INVERTED PROPERTIES( "field_pattern" = "color", "support_phrase" = "true", "parser" = "english", "lower_case" = "true"),
8080
INDEX idx2 (`overflow_properties`) USING INVERTED PROPERTIES( "field_pattern" = "tags")
@@ -106,7 +106,7 @@ suite("variant_predefine_index_doc_value", "p0"){
106106
(10, '{"color":"Yellow","description":"Shiny yellow circular badge","shape":"Wide Circle","tags":["shiny","plastic"]}');
107107
"""
108108
}
109-
trigger_and_wait_compaction(tableName, "cumulative")
109+
trigger_and_wait_compaction("objects", "full")
110110
sql "set enable_match_without_inverted_index = false"
111111
qt_sql "select count() from objects where (overflow_properties['color'] MATCH_PHRASE 'Blue')"
112112
qt_sql "select count() from objects where (array_contains(cast(overflow_properties['tags'] as array<string>), 'plastic'))"

regression-test/suites/variant_p0/ext_meta/test_variant_external_meta_integration.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ suite("test_variant_external_meta_integration", "nonConcurrent") {
3838
sql """
3939
CREATE TABLE test_inverted_index_extracted (
4040
k bigint,
41-
v variant<'name':string, 'age':int, PROPERTIES ("variant_doc_materialization_min_rows" = "0")>,
41+
v variant<'name':string, 'age':int, PROPERTIES ("variant_enable_doc_mode" = "false")>,
4242
INDEX idx_v (v) USING INVERTED PROPERTIES("parser" = "english")
4343
)
4444
DUPLICATE KEY(`k`)

regression-test/suites/variant_p0/predefine/test_multi_index_file.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ suite("test_variant_multi_index_file", "p0, nonConcurrent"){
2020
sql """ set enable_match_without_inverted_index = false """
2121
sql """ set enable_common_expr_pushdown = true """
2222
sql "set default_variant_max_subcolumns_count = 100"
23-
sql """ set default_variant_doc_materialization_min_rows = 0 """
23+
sql """ set default_variant_enable_doc_mode = false """
2424

2525
def tableName = "test_variant_multi_index_nonCurrent"
2626
sql "DROP TABLE IF EXISTS ${tableName}"

regression-test/suites/variant_p0/predefine/test_predefine_type_multi_index.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ suite("test_variant_predefine_type_multi_index", "p0"){
4343
sql """ set profile_level = 2"""
4444
sql """ set inverted_index_skip_threshold = 0 """
4545
sql """ set enable_common_expr_pushdown = true """
46-
sql """ set enable_match_without_inverted_index = false """
46+
sql """ set enable_match_without_inverted_index = true """
4747

4848
qt_sql """ select count() from ${tableName} where var['path']['string'] match 'hello' """
4949
qt_sql """ select count() from ${tableName} where var['path']['string'] = 'hello' """
@@ -54,7 +54,7 @@ suite("test_variant_predefine_type_multi_index", "p0"){
5454

5555
trigger_and_wait_compaction(tableName, "cumulative", 1800)
5656

57-
57+
sql """ set enable_match_without_inverted_index = false """
5858
qt_sql """ select count() from ${tableName} where var['path']['string'] match 'hello' """
5959
qt_sql """ select count() from ${tableName} where var['path']['string'] = 'hello' """
6060

regression-test/suites/variant_p0/test_variant_search_subcolumn.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
suite("test_variant_search_subcolumn") {
1919
def table_name = "test_variant_search_subcolumn"
20-
sql "set default_variant_doc_materialization_min_rows = 0"
20+
sql "set default_variant_enable_doc_mode = false"
2121

2222
sql "DROP TABLE IF EXISTS ${table_name}"
2323

0 commit comments

Comments
 (0)