morrySnow commented on code in PR #61842:
URL: https://github.com/apache/doris/pull/61842#discussion_r3013257868


##########
regression-test/suites/query_p0/session_variable/test_default_limit.groovy:
##########
@@ -286,4 +286,42 @@ suite('test_default_limit', "arrow_flight_sql") {
         sql 'set sql_select_limit = -1'
 
     }
+
+    // test dml
+    sql 'set default_order_by_limit = -1'
+    sql 'set sql_select_limit = 1'
+
+    sql """truncate table baseall"""
+    sql """truncate table bigtable"""
+    sql """drop table if exists unique_table"""
+    sql """create table unique_table (
+            k0 int,
+            k1 int,
+            k2 int
+        )
+        unique key (k0)
+        distributed by hash(k0) buckets 16
+        properties(
+            'replication_num'='1'
+        )
+    """
+    sql """insert into baseall values(1, 1, 1), (2, 2, 2),(3, 3, 3), (4, 4, 
4)"""
+    sql """insert into unique_table values(1, 1, 1), (2, 2, 2),(3, 3, 3)"""
+    sql "sync"
+    // should execute successful
+    sql "delete from baseall where k0 in (3, 4)"
+    sql "sync"
+    // should insert 2 lines
+    sql "insert into bigtable select * from baseall"
+    sql "sync"
+    // should update 2 lines
+    sql "update unique_table set k1 = 4 where k1 in (2, 3, 4)"
+    sql "sync"
+    // should delete 2 lines
+    sql "delete from unique_table where k0 = 1 or k0 = 2"
+    sql "sync"
+    sql 'set sql_select_limit = -1'
+    qt_baseall_should_delete_2_lines "select * from baseall order by k0"

Review Comment:
   Fixed. Added trailing newline.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to