AMashenkov commented on code in PR #2275:
URL: https://github.com/apache/ignite-3/pull/2275#discussion_r1251611060


##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItCreateTableDdlTest.java:
##########
@@ -122,6 +129,55 @@ public void implicitColocationColumns() {
         assertEquals("ID0", colocationColumns[1].name());
     }
 
+    /** Test correct mapping schema after alter columns. */
+    @Test
+    public void testDropAndAddColumns() {
+        sql("CREATE TABLE my (c1 INT PRIMARY KEY, c2 INT, c3 VARCHAR)");
+
+        sql("INSERT INTO my VALUES (1, 2, '3')");
+
+        List<List<Object>> res = sql("SELECT c1, c3 FROM my");
+
+        assertFalse(res.isEmpty());
+
+        sql("ALTER TABLE my DROP COLUMN c2");
+
+        res = sql("SELECT c1, c3 FROM my");
+
+        assertFalse(res.isEmpty());
+
+        sql("ALTER TABLE my ADD COLUMN (c2 INT, c4 VARCHAR)");

Review Comment:
   Let's have a test for adding/dropping of individual column as well as 
adding/dropping of multiple columns.



-- 
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