Skip to content

Commit

Permalink
add case: table has seq map(has default value)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobhan1 committed Oct 12, 2024
1 parent b5e0d52 commit 6428fa3
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
12 changes: 12 additions & 0 deletions regression-test/data/unique_with_mow_p0/flexible/delete11.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{"k":1,"__DORIS_DELETE_SIGN__":1}
{"k":1,"v2":1111}
{"k":1,"__DORIS_DELETE_SIGN__":1,"v1":40}
{"k":1,"v3":1111,"v1":50}
{"k":2,"__DORIS_DELETE_SIGN__":1,"v1":15}
{"k":2,"v3":2222,"v1":40}
{"k":2,"__DORIS_DELETE_SIGN__":1}
{"k":2,"v2":2222}
{"k":3,"__DORIS_DELETE_SIGN__":1}
{"k":3,"v2":3333}
{"k":3,"__DORIS_DELETE_SIGN__":1,"v1":15}
{"k":3,"v3":3333,"v1":25}
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,16 @@
12 120 12 12 12 12 120 0 2
20 90 9876 20202020 1234 9753 90 0 2,4,5,6 3

-- !insert_after_delete_3_4 --
1 50 9876 1111 1234 9753 50 0
2 40 9876 2222 1234 9753 40 0
3 30 3333 5432 1234 9753 30 0

-- !inspect --
1 50 9876 1111 1234 9753 50 0 2,4,5,6 2
2 40 9876 2222 1234 9753 40 0 2,4,5,6 2
3 30 3333 5432 1234 9753 30 0 1,3,4,5,6,9 2

-- !no_seq_col_1 --
0 0 0 0 0 0
1 1 1 1 1 1
Expand Down Expand Up @@ -859,3 +869,13 @@
12 120 12 12 12 12 120 0 2
20 90 9876 20202020 1234 9753 90 0 2,4,5,6 3

-- !insert_after_delete_3_4 --
1 50 9876 1111 1234 9753 50 0
2 40 9876 2222 1234 9753 40 0
3 30 3333 5432 1234 9753 30 0

-- !inspect --
1 50 9876 1111 1234 9753 50 0 2,4,5,6 2
2 40 9876 2222 1234 9753 40 0 2,4,5,6 2
3 30 3333 5432 1234 9753 30 0 1,3,4,5,6,10 2

Original file line number Diff line number Diff line change
Expand Up @@ -318,5 +318,35 @@ suite('test_flexible_partial_update_delete_sign') {
qt_insert_after_delete_3_3 "select k,v1,v2,v3,v4,v5,__DORIS_SEQUENCE_COL__,__DORIS_DELETE_SIGN__ from ${tableName} order by k;"
inspect_rows "select k,v1,v2,v3,v4,v5,__DORIS_SEQUENCE_COL__,__DORIS_DELETE_SIGN__,BITMAP_TO_STRING(__DORIS_SKIP_BITMAP_COL__),__DORIS_VERSION_COL__ from ${tableName} order by k,__DORIS_VERSION_COL__,v1,v2,v3,v4,v5;"


// 3.4 with seq map col (has default value)
tableName = "test_flexible_partial_update_delete_sign6_${use_row_store}"
sql """ DROP TABLE IF EXISTS ${tableName} force;"""
sql """ CREATE TABLE ${tableName} (
`k` int(11) NULL,
`v1` BIGINT NULL default "30",
`v2` BIGINT NULL DEFAULT "9876",
`v3` BIGINT NOT NULL DEFAULT "5432",
`v4` BIGINT NOT NULL DEFAULT "1234",
`v5` BIGINT NULL DEFAULT "9753"
) UNIQUE KEY(`k`) DISTRIBUTED BY HASH(`k`) BUCKETS 1
PROPERTIES(
"replication_num" = "1",
"enable_unique_key_merge_on_write" = "true",
"light_schema_change" = "true",
"enable_unique_key_skip_bitmap_column" = "true",
"function_column.sequence_col" = "v1",
"store_row_column" = "${use_row_store}"); """
streamLoad {
table "${tableName}"
set 'format', 'json'
set 'read_json_by_line', 'true'
set 'strict_mode', 'false'
set 'unique_key_update_mode', 'UPDATE_FLEXIBLE_COLUMNS'
file "delete11.json"
time 20000
}
qt_insert_after_delete_3_4 "select k,v1,v2,v3,v4,v5,__DORIS_SEQUENCE_COL__,__DORIS_DELETE_SIGN__ from ${tableName} order by k;"
inspect_rows "select k,v1,v2,v3,v4,v5,__DORIS_SEQUENCE_COL__,__DORIS_DELETE_SIGN__,BITMAP_TO_STRING(__DORIS_SKIP_BITMAP_COL__),__DORIS_VERSION_COL__ from ${tableName} order by k,__DORIS_VERSION_COL__,v1,v2,v3,v4,v5;"
}
}

0 comments on commit 6428fa3

Please sign in to comment.