tkalkirill commented on code in PR #6357:
URL: https://github.com/apache/ignite-3/pull/6357#discussion_r2269785539
##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/exp/IgniteSqlFunctionsTest.java:
##########
@@ -370,8 +371,8 @@ public void testRound2LongType(long input, int scale, long
result) {
/** Tests for TRUNCATE(x) function. */
@Test
public void testTruncate() {
- assertEquals(new BigDecimal("1"), IgniteSqlFunctions.struncate(new
BigDecimal("1.000")));
- assertEquals(new BigDecimal("1"), IgniteSqlFunctions.struncate(new
BigDecimal("1.5")));
+ assertEquals(BigDecimal.ONE, IgniteSqlFunctions.struncate(new
BigDecimal("1.000")));
Review Comment:
This is a test, not hot production code.
##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/exp/IgniteSqlFunctionsTest.java:
##########
@@ -251,8 +251,9 @@ public void testConvertDecimal(String input, int precision,
int scale, String re
/** Tests for ROUND(x) function. */
@Test
+ @SuppressWarnings("PMD.BigIntegerInstantiation")
public void testRound() {
- assertEquals(new BigDecimal("1"), IgniteSqlFunctions.sround(new
BigDecimal("1.000")));
+ assertEquals(BigDecimal.ONE, IgniteSqlFunctions.sround(new
BigDecimal("1.000")));
Review Comment:
This is a test, not hot production code.
##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/exp/IgniteSqlFunctionsTest.java:
##########
@@ -370,8 +371,8 @@ public void testRound2LongType(long input, int scale, long
result) {
/** Tests for TRUNCATE(x) function. */
@Test
public void testTruncate() {
- assertEquals(new BigDecimal("1"), IgniteSqlFunctions.struncate(new
BigDecimal("1.000")));
- assertEquals(new BigDecimal("1"), IgniteSqlFunctions.struncate(new
BigDecimal("1.5")));
+ assertEquals(BigDecimal.ONE, IgniteSqlFunctions.struncate(new
BigDecimal("1.000")));
+ assertEquals(BigDecimal.ONE, IgniteSqlFunctions.struncate(new
BigDecimal("1.5")));
Review Comment:
This is a test, not hot production code.
--
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]