From 6428fa3aa51d9a1b6f0d00748fd05e4bc79b80aa Mon Sep 17 00:00:00 2001 From: bobhan1 Date: Sat, 12 Oct 2024 15:07:23 +0800 Subject: [PATCH] add case: table has seq map(has default value) --- .../unique_with_mow_p0/flexible/delete11.json | 12 ++++++++ ...st_flexible_partial_update_delete_sign.out | 20 +++++++++++++ ...flexible_partial_update_delete_sign.groovy | 30 +++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 regression-test/data/unique_with_mow_p0/flexible/delete11.json diff --git a/regression-test/data/unique_with_mow_p0/flexible/delete11.json b/regression-test/data/unique_with_mow_p0/flexible/delete11.json new file mode 100644 index 000000000000000..d647524e8d30a09 --- /dev/null +++ b/regression-test/data/unique_with_mow_p0/flexible/delete11.json @@ -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} diff --git a/regression-test/data/unique_with_mow_p0/flexible/test_flexible_partial_update_delete_sign.out b/regression-test/data/unique_with_mow_p0/flexible/test_flexible_partial_update_delete_sign.out index 937c7b20d0d36ca..515f66e2150ef10 100644 --- a/regression-test/data/unique_with_mow_p0/flexible/test_flexible_partial_update_delete_sign.out +++ b/regression-test/data/unique_with_mow_p0/flexible/test_flexible_partial_update_delete_sign.out @@ -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 @@ -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 + diff --git a/regression-test/suites/unique_with_mow_p0/flexible/test_flexible_partial_update_delete_sign.groovy b/regression-test/suites/unique_with_mow_p0/flexible/test_flexible_partial_update_delete_sign.groovy index 895b54ae089d1d4..8ba15ee6983ca39 100644 --- a/regression-test/suites/unique_with_mow_p0/flexible/test_flexible_partial_update_delete_sign.groovy +++ b/regression-test/suites/unique_with_mow_p0/flexible/test_flexible_partial_update_delete_sign.groovy @@ -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;" } } \ No newline at end of file