mihaibudiu commented on code in PR #3790:
URL: https://github.com/apache/calcite/pull/3790#discussion_r1625193179


##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -738,30 +739,32 @@ void testCastToExactNumeric(CastType castType, 
SqlOperatorFixture f) {
   @MethodSource("safeParameters")
   void testCastStringToDecimal(CastType castType, SqlOperatorFixture f) {
     f.setFor(SqlStdOperatorTable.CAST, VmName.EXPAND);
-    if (!DECIMAL) {
-      return;
-    }
     // string to decimal
     f.checkScalarExact("cast('1.29' as decimal(2,1))",
         "DECIMAL(2, 1) NOT NULL",
-        "1.3");
+        "1.2");

Review Comment:
   @YiwenWu I have written about the rounding mode used in Calcite: 
https://issues.apache.org/jira/browse/CALCITE-6322. Here I am just consistent 
with the rest of the codebase, but I agree that I would prefer a different 
rounding mode. Maybe this should be part of the typesystem.



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to