lowka commented on code in PR #2690:
URL: https://github.com/apache/ignite-3/pull/2690#discussion_r1365061011


##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/exp/IgniteSqlFunctionsTest.java:
##########
@@ -242,4 +245,57 @@ public void testConvertDecimal(String input, int 
precision, int scale, String re
             assertThrowsSqlException(Sql.RUNTIME_ERR, "Numeric field 
overflow", convert::get);
         }
     }
+
+    /** Tests for ROUND(x) function. */
+    @Test
+    public void testRound() {
+        assertEquals(new BigDecimal("1"), IgniteSqlFunctions.sround(new 
BigDecimal("1.000")));
+        assertEquals(1, IgniteSqlFunctions.sround(1), "int");
+        assertEquals(1L, IgniteSqlFunctions.sround(1L), "long");
+        assertEquals(1.0d, IgniteSqlFunctions.sround(1.123d), "double");
+    }
+
+    /** Tests for ROUND(x, s) function, where x is a BigDecimal value. */
+    @ParameterizedTest
+    @CsvSource({
+            "1.123, 0, 1.000",

Review Comment:
   Sure. 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: [email protected]

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

Reply via email to