korlov42 commented on code in PR #5751: URL: https://github.com/apache/ignite-3/pull/5751#discussion_r2076890609
########## modules/sql-engine/src/main/codegen/includes/parserImpls.ftl: ########## @@ -761,6 +761,10 @@ SqlNode SqlAlterZone() : { s.add(this); } optionList = AlterZoneOptions() { return new IgniteSqlAlterZoneSet(s.end(this), zoneId, optionList, ifExists); } + | + { s.add(this); } optionList = ZoneOptionsList() { Review Comment: I think we should also allow simplified form without parenthesis for alteration of a single option: `ALTER ZONE my_zone SET replicas 4` ########## modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/sql/IgniteSqlAlterZone.java: ########## @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.sql.engine.sql; + +import java.util.List; +import java.util.Objects; +import org.apache.calcite.sql.SqlCall; +import org.apache.calcite.sql.SqlIdentifier; +import org.apache.calcite.sql.SqlKind; +import org.apache.calcite.sql.SqlLiteral; +import org.apache.calcite.sql.SqlNode; +import org.apache.calcite.sql.SqlNodeList; +import org.apache.calcite.sql.SqlWriter; +import org.apache.calcite.sql.parser.SqlParserPos; +import org.apache.calcite.util.ImmutableNullableList; +import org.checkerframework.checker.nullness.qual.Nullable; + +/** + * Parse tree for {@code ALTER ZONE SET} statement. + */ +public class IgniteSqlAlterZone extends IgniteAbstractSqlAlterZone { Review Comment: why do we need new sql node? ########## modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/sql/DistributionZoneSqlDdlParserTest.java: ########## @@ -291,13 +291,15 @@ public void alterZoneIfExistsSet() { */ @Test public void alterZoneSetOptions() { - IgniteSqlAlterZoneSet alterZoneSet = parseAlterZoneSet( - "alter zone a.test_zone set " - + "replicas=2, " - + "data_nodes_filter='(\"US\" || \"EU\") && \"SSD\"', " - + "data_nodes_auto_adjust=1, " - + "data_nodes_auto_adjust_scale_up=2, " - + "data_nodes_auto_adjust_scale_down=3" + IgniteSqlAlterZone alterZoneSet = parseAlterZone( + "alter zone a.test_zone set (" + + "REPLICAS 2, " + + "PARTITIONS 3, " + + "DISTRIBUTION ALGORITHM 'test_Distribution', " Review Comment: change of partitions as well as change of distribution algorithm is not allowed -- 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