zstan commented on code in PR #5479: URL: https://github.com/apache/ignite-3/pull/5479#discussion_r2024840050
########## modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/LogicalRelImplementor.java: ########## @@ -1168,6 +1155,20 @@ private static boolean canFuseProjectionInto(RelNode rel) { return joinProjection; } + private long validateAndGetFetchOffsetParams(RexNode node, String op) { + SqlScalar<RowT, Number> sqlScalar = expressionFactory.scalar(node); + Number param = sqlScalar.get(ctx); + + if (param instanceof BigDecimal) { + BigDecimal param0 = (BigDecimal) param; + if (param0.signum() == -1 || param0.compareTo(LIMIT_UPPER) > 0) { + throw new SqlException(Sql.STMT_VALIDATION_ERR, IgniteResource.INSTANCE.illegalFetchLimit(op).str()); + } + } Review Comment: done -- 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