From cb55e9a48b714b123ecfbfb6775e344ac63527c5 Mon Sep 17 00:00:00 2001 From: bobhan1 Date: Thu, 12 Oct 2023 14:53:49 +0800 Subject: [PATCH] fix --- .../test_partial_update_parallel.out | 7 ++ .../test_partial_update_parallel.groovy | 74 +++++++++++++++++++ 2 files changed, 81 insertions(+) diff --git a/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_parallel.out b/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_parallel.out index bcd7e86c53ce311..ac9100bddd6a4cc 100644 --- a/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_parallel.out +++ b/regression-test/data/unique_with_mow_p0/partial_update/test_partial_update_parallel.out @@ -6,3 +6,10 @@ 4 "bbbbbbbb" 4444 499 40 5 "cccccccccccc" 5555 599 50 +-- !sql -- +1 "ddddddddddd" 1111 199 10 +2 "eeeeee" 2222 299 20 +3 "aaaaa" 3333 399 30 +4 "bbbbbbbb" 4444 499 40 +5 "cccccccccccc" 5555 599 50 + diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_parallel.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_parallel.groovy index 19522e8064e122b..4c545ec57ce592e 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_parallel.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_parallel.groovy @@ -90,5 +90,79 @@ suite("test_primary_key_partial_update_parallel", "p0") { qt_sql """ select * from ${tableName} order by id;""" sql """ DROP TABLE IF EXISTS ${tableName}; """ + + + tableName = "test_primary_key_row_store_partial_update" + // create table + sql """ DROP TABLE IF EXISTS ${tableName} """ + sql """ + CREATE TABLE ${tableName} ( + `id` int(11) NOT NULL COMMENT "用户 ID", + `name` varchar(65533) NOT NULL COMMENT "用户姓名", + `score` int(11) NOT NULL COMMENT "用户得分", + `test` int(11) NULL COMMENT "null test", + `dft` int(11) DEFAULT "4321") + UNIQUE KEY(`id`) DISTRIBUTED BY HASH(`id`) BUCKETS 1 + PROPERTIES("replication_num" = "1", "enable_unique_key_merge_on_write" = "true", "store_row_column" = "true") + """ + + sql """insert into ${tableName} values + (2, "doris2", 2000, 223, 2), + (1, "doris", 1000, 123, 1), + (5, "doris5", 5000, 523, 5), + (4, "doris4", 4000, 423, 4), + (3, "doris3", 3000, 323, 3);""" + + t1 = Thread.startDaemon { + streamLoad { + table "${tableName}" + + set 'column_separator', ',' + set 'format', 'csv' + set 'partial_columns', 'true' + set 'columns', 'id,name' + + file 'partial_update_parallel1.csv' + time 10000 // limit inflight 10s + } + } + + t2 = Thread.startDaemon { + streamLoad { + table "${tableName}" + + set 'column_separator', ',' + set 'format', 'csv' + set 'partial_columns', 'true' + set 'columns', 'id,score,test' + + file 'partial_update_parallel2.csv' + time 10000 // limit inflight 10s + } + } + + t3 = Thread.startDaemon { + streamLoad { + table "${tableName}" + + set 'column_separator', ',' + set 'format', 'csv' + set 'partial_columns', 'true' + set 'columns', 'id,dft' + + file 'partial_update_parallel3.csv' + time 10000 // limit inflight 10s + } + } + + t1.join() + t2.join() + t3.join() + + sql "sync" + + qt_sql """ select * from ${tableName} order by id;""" + + sql """ DROP TABLE IF EXISTS ${tableName}; """ }