zhannngchen commented on code in PR #36579:
URL: https://github.com/apache/doris/pull/36579#discussion_r1666546072


##########
regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_insert_with_hint.groovy:
##########
@@ -0,0 +1,124 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite('test_partial_update_insert_with_hint') {
+    sql 'set enable_nereids_planner=false'
+    sql 'set experimental_enable_nereids_planner=false;'
+    sql 'set enable_fallback_to_original_planner=true'
+    sql 'set enable_nereids_dml=false'
+
+    def tableName = "test_partial_update_insert_with_hint"
+    sql """ DROP TABLE IF EXISTS ${tableName} """
+    sql """
+            CREATE TABLE ${tableName} (
+                `id` int(11) NOT NULL COMMENT "用户 ID",
+                `name` varchar(65533) NOT NULL DEFAULT "yixiu" 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")
+    """
+    sql """insert into ${tableName} values(2, "doris2", 2000, 223, 1),(1, 
"doris", 1000, 123, 1)"""
+    qt_1 """ select * from ${tableName} order by id; """
+    // partial update using insert stmt in non-strict mode,
+    // existing rows should be updated and new rows should be inserted with 
unmentioned columns filled with default or null value
+    sql """insert /*+ SET_VAR(enable_unique_key_partial_update=true, 
enable_insert_strict = false)*/

Review Comment:
   need to cover more tests for session variables related with insert into



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to