ILuffZhe commented on code in PR #4432:
URL: https://github.com/apache/calcite/pull/4432#discussion_r2160902609


##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -3459,7 +3459,7 @@ private void registerOperandSubQueries(
       final BigDecimal noTrailingZeros = bd.stripTrailingZeros();
       // If we don't strip trailing zeros we may reject values such as 
1.000....0.
 
-      final int maxPrecision = typeSystem.getMaxNumericPrecision();
+      final int maxPrecision = typeSystem.getMaxPrecision(SqlTypeName.DECIMAL);

Review Comment:
   We will get default MaxNumericPrecision, which is 19, will cause out of 
range error.
   BTW, getMaxNumericPrecision() method is about to be deprecatet in the future.



-- 
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