zstan commented on code in PR #13375:
URL: https://github.com/apache/ignite/pull/13375#discussion_r3734036123


##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/LogicalRelImplementor.java:
##########
@@ -1079,7 +1081,8 @@ private long validateAndGetFetchOffsetParams(RexNode 
node, String op) {
         long paramAsLong;
 
         try {
-            paramAsLong = IgniteMath.convertToLongExact((Number)param);
+            BigDecimal val = IgniteMath.convertToBigDecimal((Number)param);

Review Comment:
   My point : 
   seems we need to change : public static final RoundingMode 
NUMERIC_ROUNDING_MODE = RoundingMode.HALF_UP;
   like : 
       /** Decimal rounding mode. */
       public static final RoundingMode ROUNDING_MODE = 
IgniteTypeSystem.INSTANCE.roundingMode();
   
   plz check how it made here :
   
   
https://github.com/apache/ignite-3/blob/main/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/util/IgniteMath.java#L52
   
   and calls through IgniteSqlFunctions#toBigDecimal(java.lang.Number, int, 
int) will use correct rounding



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to