alex-plekhanov commented on code in PR #11644:
URL: https://github.com/apache/ignite/pull/11644#discussion_r1829786854


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/util/IgniteMath.java:
##########
@@ -283,14 +269,13 @@ public static int convertToIntExact(long x) {
 
     /** Cast value to {@code int}, throwing an exception if the result 
overflows an {@code int}. */
     public static int convertToIntExact(double x) {
-        if (x > Integer.MAX_VALUE || x < Integer.MIN_VALUE)
-            throw new ArithmeticException(INTEGER.getName() + " overflow");

Review Comment:
   These checks are still required. For example, if x overflow long value it 
can be converted to unexpected value without error



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