This is an automated email from the ASF dual-hosted git repository.
amashenkov pushed a commit to branch ignite-21969
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/ignite-21969 by this push:
new 4c3e321c36 Minor.
4c3e321c36 is described below
commit 4c3e321c365e56e446e84fe2f7c3ee7f8de06838
Author: amashenkov <[email protected]>
AuthorDate: Fri May 31 16:57:55 2024 +0300
Minor.
---
.../internal/sql/engine/ItAlterTableDdlTest.java | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git
a/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItAlterTableDdlTest.java
b/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItAlterTableDdlTest.java
index bdb67387cf..1236db968b 100644
---
a/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItAlterTableDdlTest.java
+++
b/modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItAlterTableDdlTest.java
@@ -96,6 +96,29 @@ public class ItAlterTableDdlTest extends
BaseSqlIntegrationTest {
.check();
}
+ /** Test add/drop column short syntax. */
+ @Test
+ public void testDropAndAddColumnShortSyntax() {
+ sql("CREATE TABLE my (c1 INT PRIMARY KEY, c2 INT)");
+
+ sql("ALTER TABLE my ADD (c3 VARCHAR)");
+ sql("ALTER TABLE my ADD (c4 INT DEFAULT -1, c5 INT)");
+
+ sql("INSERT INTO my (c1, c2, c3) VALUES (1, 2, '3')");
+
+ sql("ALTER TABLE my DROP c2");
+
+ assertQuery("SELECT * FROM my")
+ .returns(1, "3", -1, null)
+ .check();
+
+ sql("ALTER TABLE my DROP c3, c5");
+
+ assertQuery("SELECT * FROM my")
+ .returns(1, -1)
+ .check();
+ }
+
/** Test that adding nullable column via ALTER TABLE ADD name type NULL
works. */
@Test
public void testNullableColumn() {