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


##########
docs/_docs/sql-reference/ddl.adoc:
##########
@@ -97,18 +94,7 @@ CREATE TABLE IF NOT EXISTS Person (
   name varchar,
   age int,
   company varchar
-) WITH PRIMARY_ZONE=`MYZONE`
-----
-
-Creates a Person table where the records expire at timestamps in the `ttl` 
column:
-
-[source,sql]
-----
-CREATE TABLE IF NOT EXISTS Person ( 
-  id int PRIMARY KEY,
-  name varchar,
-  ttl timestamp
-) EXPIRE AT ttl
+) ZONE=`MYZONE`

Review Comment:
   I bet this example won't work



##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/benchmark/SqlIndexScanBenchmark.java:
##########
@@ -92,7 +92,7 @@ public void setUp() throws Exception {
             if 
(!Files.exists(workDir().resolve(DATASET_READY_MARK_FILE_NAME))) {
                 sql.executeScript(
                         "CREATE ZONE single_partition_zone WITH replicas = 1, 
partitions = 1;"
-                                + "CREATE TABLE test (id INT PRIMARY KEY, val 
DATE) WITH primary_zone = single_partition_zone;"
+                                + "CREATE TABLE test (id INT PRIMARY KEY, val 
DATE) zone single_partition_zone;"

Review Comment:
   ```suggestion
                                   + "CREATE TABLE test (id INT PRIMARY KEY, 
val DATE) ZONE single_partition_zone;"
   ```



##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/benchmark/AbstractMultiNodeBenchmark.java:
##########
@@ -132,7 +132,7 @@ protected static void createTable(String tableName, 
List<String> columns, List<S
             createTableStatement += "\nCOLOCATE BY (" + String.join(", ", 
colocationKeys) + ")";
         }
 
-        createTableStatement += "\nWITH primary_zone='" + ZONE_NAME + "'";
+        createTableStatement += "\nzone " + ZONE_NAME;

Review Comment:
   ```suggestion
           createTableStatement += "\nZONE " + ZONE_NAME;
   ```



##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/schemasync/ItSchemaSyncMultiNodeTest.java:
##########
@@ -186,7 +186,7 @@ void ddlAfterDdlOnAnotherNodeSeesFirstDdlResults() {
             });
 
             CompletableFuture<Void> tableCreationFuture = runAsync(() -> 
cluster.doInSession(NODE_1_INDEX, session -> {
-                executeUpdate("CREATE TABLE " + TABLE_NAME + " (id int PRIMARY 
KEY, val varchar) WITH primary_zone='TEST_ZONE'", session);
+                executeUpdate("CREATE TABLE " + TABLE_NAME + " (id int PRIMARY 
KEY, val varchar) zone TEST_ZONE", session);

Review Comment:
   ```suggestion
                   executeUpdate("CREATE TABLE " + TABLE_NAME + " (id int 
PRIMARY KEY, val varchar) ZONE TEST_ZONE", session);
   ```



##########
docs/_docs/developers-guide/java-to-tables.adoc:
##########
@@ -82,7 +82,7 @@ The result is equivalent to the following SQL multi-statement:
 
 [source, sql]
 ----
-CREATE ZONE IF NOT EXISTS zone_test ENGINE ROCKSDB WITH PARTITIONS=2;
+CREATE ZONE IF NOT EXISTS ZONE_TEST ENGINE ROCKSDB WITH PARTITIONS=2;

Review Comment:
   I would leave it in lower case to not mix with keywords



##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/prepare/ddl/DdlSqlToCommandConverterTest.java:
##########
@@ -613,12 +609,12 @@ public Stream<DynamicTest> timestampWithTzWithDefaults() {
 
     @Test
     public void tableWithAutogenPkColumn() throws SqlParseException {
-        var node = parse("CREATE TABLE t (id uuid default rand_uuid primary 
key, val int) WITH STORAGE_PROFILE='"
+        var node = parse("CREATE TABLE t (id uuid default rand_uuid primary 
key, val int) STORAGE PROFILE '"

Review Comment:
   `var` is not allowed in this context 



##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/sql/IgniteSqlCreateTable.java:
##########
@@ -49,33 +49,37 @@ protected Operator(boolean existFlag) {
         public SqlCall createCall(@Nullable SqlLiteral functionQualifier, 
SqlParserPos pos,
                 @Nullable SqlNode... operands) {
             return new IgniteSqlCreateTable(pos, existFlag(), (SqlIdentifier) 
operands[0], (SqlNodeList) operands[1],
-                    (SqlNodeList) operands[2], (SqlNodeList) operands[3]);
+                    (SqlNodeList) operands[2], (SqlIdentifier) operands[3], 
(SqlLiteral) operands[4]);
         }
     }
 
     private final SqlIdentifier name;
+    @Nullable

Review Comment:
   annotation seems to be misplaced



##########
modules/catalog/src/integrationTest/java/org/apache/ignite/internal/catalog/it/ItConcurrentDdlsTest.java:
##########
@@ -62,7 +62,7 @@ private void createTablesInParallel() {
             String tableName = "TEST" + n;
 
             node(0).sql().executeScript(
-                    "CREATE TABLE " + tableName + " (id INT PRIMARY KEY, val 
VARCHAR) WITH primary_zone='" + ZONE_NAME + "'"
+                    "CREATE TABLE " + tableName + " (id INT PRIMARY KEY, val 
VARCHAR) zone " + ZONE_NAME

Review Comment:
   ```suggestion
                       "CREATE TABLE " + tableName + " (id INT PRIMARY KEY, val 
VARCHAR) ZONE " + ZONE_NAME
   ```
   



##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/ItIgniteNodeRestartTest.java:
##########
@@ -1758,7 +1757,7 @@ public void tableRecoveryOnMultipleRestartingNodes(int 
nodeThatWrittenAssignment
         nodeInhibitor2.startInhibit();
 
         sql.executeAsync(null, "CREATE TABLE " + tableName
-                + "(id INT PRIMARY KEY, name VARCHAR) WITH PRIMARY_ZONE='" + 
zoneName + "';");
+                + "(id INT PRIMARY KEY, name VARCHAR) ZONE" + zoneName + ";");

Review Comment:
   missed space after ZONE keyword



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