valepakh commented on code in PR #5795:
URL: https://github.com/apache/ignite-3/pull/5795#discussion_r2086693763


##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/prepare/ddl/DistributionZoneSqlToCommandConverterTest.java:
##########
@@ -184,21 +171,24 @@ public void testCreateZoneWithOptions(boolean 
withPresent) throws SqlParseExcept
                             + "storage_profiles='lru_rocks , 
segmented_aipersist ' "
                     : "CREATE ZONE test "
                             + "(partitions 2, "
-                            + "replicas 3, "
+                            + "replicas 5, "
+                            + "quorum size 2, " // non-default value
                             + "distribution algorithm 'rendezvous', "
                             + "nodes filter '$[?(@.region == \"US\")]', "
                             + "auto adjust 300) "
                             + "storage profiles ['lru_rocks', 
'segmented_aipersist '] ";
 
-            SqlNode node = parse(sql);
-
-            assertThat(node, instanceOf(SqlDdl.class));
-
-            CatalogCommand cmd = converter.convert((SqlDdl) node, 
createContext());
+            CatalogCommand cmd = convert(sql);
             CatalogZoneDescriptor desc = invokeAndGetFirstEntry(cmd, 
NewZoneEntry.class).descriptor();
 
             assertThat(desc.partitions(), equalTo(2));
-            assertThat(desc.replicas(), equalTo(3));
+            if (withPresent) {
+                // There's no quorum size with "with" syntax, so keep default

Review Comment:
   Added system view. There's also a catalog DSL, I've a follow-up ticket for 
that.



##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/prepare/ddl/DistributionZoneSqlToCommandConverterTest.java:
##########
@@ -184,21 +171,24 @@ public void testCreateZoneWithOptions(boolean 
withPresent) throws SqlParseExcept
                             + "storage_profiles='lru_rocks , 
segmented_aipersist ' "
                     : "CREATE ZONE test "
                             + "(partitions 2, "
-                            + "replicas 3, "
+                            + "replicas 5, "
+                            + "quorum size 2, " // non-default value
                             + "distribution algorithm 'rendezvous', "
                             + "nodes filter '$[?(@.region == \"US\")]', "
                             + "auto adjust 300) "
                             + "storage profiles ['lru_rocks', 
'segmented_aipersist '] ";
 
-            SqlNode node = parse(sql);
-
-            assertThat(node, instanceOf(SqlDdl.class));
-
-            CatalogCommand cmd = converter.convert((SqlDdl) node, 
createContext());
+            CatalogCommand cmd = convert(sql);
             CatalogZoneDescriptor desc = invokeAndGetFirstEntry(cmd, 
NewZoneEntry.class).descriptor();
 
             assertThat(desc.partitions(), equalTo(2));
-            assertThat(desc.replicas(), equalTo(3));
+            if (withPresent) {
+                // There's no quorum size with "with" syntax, so keep default

Review Comment:
   Added quorum size to system view. There's also a catalog DSL, I've a 
follow-up ticket for that.



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