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


##########
core/src/main/java/org/apache/calcite/sql/type/SqlTypeUtil.java:
##########
@@ -1836,7 +1836,7 @@ public static boolean isValidDecimalValue(@Nullable 
BigDecimal value, RelDataTyp
     case DECIMAL:
       final int intDigits = value.precision() - value.scale();
       final int maxIntDigits = toType.getPrecision() - toType.getScale();
-      return intDigits <= maxIntDigits;
+      return (intDigits <= maxIntDigits) && (value.scale() <= 
toType.getScale());

Review Comment:
   I will check, this may be a leftover that is not needed here, but is needed 
for https://issues.apache.org/jira/browse/CALCITE-3522. I expect that 
eventually we will need this 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]

Reply via email to