alex-plekhanov commented on code in PR #11635: URL: https://github.com/apache/ignite/pull/11635#discussion_r1829810235
########## modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/util/IgniteMath.java: ########## @@ -308,17 +297,20 @@ public static short convertToShortExact(long x) { /** Cast value to {@code short}, throwing an exception if the result overflows an {@code short}. */ public static short convertToShortExact(double x) { - if (x > Short.MAX_VALUE || x < Short.MIN_VALUE) Review Comment: New code still has errors on bounds. Condition can be changed to: `if (x >= Short.MAX_VALUE + 1d || x =< Short.MIN_VALUE - 1d)` ########## modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/util/IgniteMath.java: ########## @@ -308,17 +297,20 @@ public static short convertToShortExact(long x) { /** Cast value to {@code short}, throwing an exception if the result overflows an {@code short}. */ public static short convertToShortExact(double x) { - if (x > Short.MAX_VALUE || x < Short.MIN_VALUE) Review Comment: New code still has errors on bounds. Condition can be changed to: `if (x >= Short.MAX_VALUE + 1d || x =< Short.MIN_VALUE - 1d)` -- 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