korlov42 commented on code in PR #5868:
URL: https://github.com/apache/ignite-3/pull/5868#discussion_r2104623024


##########
modules/sql-engine/src/integrationTest/sql/group1/explain/modify.test:
##########
@@ -0,0 +1,339 @@
+statement ok
+CREATE TABLE test_table (c1 INT PRIMARY KEY, c2 INT, c3 INT);
+
+# insert single tuple with literals
+plan
+INSERT INTO test_table VALUES (1, 2, 3)
+----
+KeyValueModify
+    table: PUBLIC.TEST_TABLE
+    operation: PUT
+    expressions: [1, 2, 3]
+    est: (rows=1)
+
+# insert single tuple with literals different order
+plan
+INSERT INTO test_table (c2, c3, c1) VALUES (1, 2, 3)
+----
+KeyValueModify
+    table: PUBLIC.TEST_TABLE
+    operation: PUT
+    expressions: [3, 1, 2]
+    est: (rows=1)
+
+# insert single tuple mixed
+plan
+INSERT INTO test_table VALUES (1, LENGTH(rand_uuid()::VARCHAR), 3)
+----
+KeyValueModify
+    table: PUBLIC.TEST_TABLE
+    operation: PUT
+    expressions: [1, LENGTH(CAST(RAND_UUID()):VARCHAR CHARACTER SET "UTF-8" 
NOT NULL), 3]
+    est: (rows=1)
+
+# https://issues.apache.org/jira/browse/IGNITE-25454
+# at the moment, distribution's printout depends on the state of the catalog 
because
+# it contains ids of table and zone. This makes the test unstable depending on 
whether
+# how many catalog objects were created prior to this script. We need to change
+# the way how distribution is rendered in the EXPLAIN output and unmute this 
test.
+skipif ignite3
+# insert multiple tuples with literals
+plan
+INSERT INTO test_table VALUES (1, 2, 3), (2, 2, 3)
+----
+Project
+    fields: [ROWCOUNT]
+    exprs: [CAST($f0):BIGINT NOT NULL]
+    est: (rows=1)
+  ColocatedHashAggregate
+      group: []
+      aggs: [$SUM0(ROWCOUNT)]
+      est: (rows=1)
+    Exchange
+        distribution: single
+        est: (rows=2)
+      TableModify
+          table: [PUBLIC, TEST_TABLE]
+          operation: INSERT
+          flattened: false
+          est: (rows=2)
+        TrimExchange
+            distribution: affinity[tableId=18, zoneId=18][0]
+            est: (rows=2)
+          Values
+              type: [#0: C1 INTEGER, #1: C2 INTEGER, #2: C3 INTEGER]
+              tuples: [[1, 2, 3], [2, 2, 3]]
+              est: (rows=2)
+
+# https://issues.apache.org/jira/browse/IGNITE-25454
+# at the moment, distribution's printout depends on the state of the catalog 
because
+# it contains ids of table and zone. This makes the test unstable depending on 
whether
+# how many catalog objects were created prior to this script. We need to change
+# the way how distribution is rendered in the EXPLAIN output and unmute this 
test.
+skipif ignite3
+# insert multiple tuples mixed
+plan
+INSERT INTO test_table VALUES (1, LENGTH(rand_uuid()::VARCHAR), 3), (2, 
LENGTH(rand_uuid()::VARCHAR), 3)
+----
+Project
+    fields: [ROWCOUNT]
+    exprs: [CAST($f0):BIGINT NOT NULL]
+    est: (rows=2)
+  ColocatedHashAggregate
+      group: []
+      aggs: [$SUM0(ROWCOUNT)]
+      est: (rows=2)
+    Exchange
+        distribution: single
+        est: (rows=2)
+      TableModify
+          table: [PUBLIC, TEST_TABLE]
+          operation: INSERT
+          flattened: false
+          est: (rows=2)
+        UnionAll
+            all: true
+            est: (rows=2)
+          Exchange
+              distribution: affinity[tableId=18, zoneId=18][0]
+              est: (rows=1)
+            Project
+                fields: [EXPR$0, EXPR$1, EXPR$2]
+                exprs: [1, LENGTH(CAST(RAND_UUID()):VARCHAR CHARACTER SET 
"UTF-8" NOT NULL), 3]
+                est: (rows=1)
+              Values
+                  type: [#0: ZERO INTEGER]
+                  tuples: [[0]]
+                  est: (rows=1)
+          Exchange
+              distribution: affinity[tableId=18, zoneId=18][0]
+              est: (rows=1)
+            Project
+                fields: [EXPR$0, EXPR$1, EXPR$2]
+                exprs: [2, LENGTH(CAST(RAND_UUID()):VARCHAR CHARACTER SET 
"UTF-8" NOT NULL), 3]
+                est: (rows=1)
+              Values
+                  type: [#0: ZERO INTEGER]
+                  tuples: [[0]]
+                  est: (rows=1)
+
+# delete by key simple
+plan
+DELETE FROM test_table WHERE c1 = 1
+----
+Project
+    fields: [ROWCOUNT]
+    exprs: [CAST($f0):BIGINT NOT NULL]
+    est: (rows=1)
+  ColocatedHashAggregate
+      group: []
+      aggs: [$SUM0(ROWCOUNT)]
+      est: (rows=1)
+    Exchange
+        distribution: single
+        est: (rows=1)
+      TableModify
+          table: [PUBLIC, TEST_TABLE]

Review Comment:
   this will be addressed in https://issues.apache.org/jira/browse/IGNITE-25471



-- 
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: notifications-unsubscr...@ignite.apache.org

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

Reply via email to