lowka commented on code in PR #5084:
URL: https://github.com/apache/ignite-3/pull/5084#discussion_r1926508827


##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItCreateTableDdlTest.java:
##########
@@ -345,6 +345,48 @@ public void 
testItIsNotPossibleToCreateTablesInSystemSchema(String schema) {
                 () -> sql(format("CREATE TABLE {}.SYS_TABLE (NAME VARCHAR 
PRIMARY KEY, SIZE BIGINT)", schema.toLowerCase())));
     }
 
+    @ParameterizedTest
+    @MethodSource("reservedSchemaNames")
+    public void testCreateSystemSchemas(String schema) {
+        if (!DEFAULT_SCHEMA_NAME.equals(schema)) {
+            assertThrowsSqlException(
+                    STMT_VALIDATION_ERR,
+                    format("Reserved system schema with name '{}' can't be 
created.", schema),
+                    () -> sql(format("CREATE SCHEMA {}", 
schema.toLowerCase())));
+
+            assertThrowsSqlException(
+                    STMT_VALIDATION_ERR,
+                    format("Reserved system schema with name '{}' can't be 
created.", schema),
+                    () -> sql(format("CREATE SCHEMA {}", schema)));
+
+            assertThrowsSqlException(
+                    STMT_VALIDATION_ERR,
+                    format("Reserved system schema with name '{}' can't be 
created.", schema),
+                    () -> sql(format("CREATE SCHEMA \"{}\"", schema)));
+        }
+    }
+
+    @ParameterizedTest
+    @MethodSource("reservedSchemaNames")
+    public void testDropSystemSchemas(String schema) {
+        if (!DEFAULT_SCHEMA_NAME.equals(schema)) {

Review Comment:
   I think default schema name is PUBLIC and the PUBLIC schema is not on a list 
of reservedSchemaNames.



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