korlov42 commented on code in PR #6263: URL: https://github.com/apache/ignite-3/pull/6263#discussion_r2213290020
########## modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java: ########## @@ -144,6 +144,11 @@ public class CatalogUtils { */ public static final int DEFAULT_LENGTH = 1; + /** + * Passing this value as a auto adjust param means that this option is disabled. + */ + public static int AUTO_ADJUST_OFF = Integer.MAX_VALUE; Review Comment: there is already `INFINITE_TIMER_VALUE` ########## modules/sql-engine/src/main/codegen/includes/parserImpls.ftl: ########## @@ -629,16 +629,43 @@ void ZoneElement(List<SqlNode> zoneOptions) : ( <SCALE> ( - <UP> option = UnsignedIntegerLiteral() - { - key = new SqlIdentifier(ZoneOptionEnum.DATA_NODES_AUTO_ADJUST_SCALE_UP.name(), pos); - zoneOptions.add(new IgniteSqlZoneOption(key, option, s.end(this))); - } + <UP> + ( + option = UnsignedIntegerLiteral() + { + key = new SqlIdentifier(ZoneOptionEnum.DATA_NODES_AUTO_ADJUST_SCALE_UP.name(), pos); + zoneOptions.add(new IgniteSqlZoneOption(key, option, s.end(this))); + } + | + <OFF> + { + key = new SqlIdentifier(ZoneOptionEnum.DATA_NODES_AUTO_ADJUST_SCALE_UP.name(), pos); + zoneOptions.add(new IgniteSqlZoneOption(key, IgniteSqlZoneOptionMode.SCALE_OFF.symbol(getPos()), s.end(this))); + } + ) | - <DOWN> option = UnsignedIntegerLiteral() + <DOWN> + ( + option = UnsignedIntegerLiteral() + { + key = new SqlIdentifier(ZoneOptionEnum.DATA_NODES_AUTO_ADJUST_SCALE_DOWN.name(), pos); + zoneOptions.add(new IgniteSqlZoneOption(key, option, s.end(this))); + } + | + <OFF> + { + key = new SqlIdentifier(ZoneOptionEnum.DATA_NODES_AUTO_ADJUST_SCALE_DOWN.name(), pos); + zoneOptions.add(new IgniteSqlZoneOption(key, IgniteSqlZoneOptionMode.SCALE_OFF.symbol(getPos()), s.end(this))); + } + ) + | + <OFF> Review Comment: let's move this to <ADJUST> branch: `AUTO ADJUST OFF` ########## modules/sql-engine/src/main/codegen/includes/parserImpls.ftl: ########## @@ -733,6 +760,10 @@ void CreateZoneOption(List<SqlNode> list) : <ALL> { list.add(new IgniteSqlZoneOption(key, IgniteSqlZoneOptionMode.ALL.symbol(getPos()), s.end(this))); } + | Review Comment: I wouldn't update the old syntax. The longer it stays relevant, the longer people will stick to it -- 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