vladErmakov07 commented on a change in pull request #243:
URL: https://github.com/apache/ignite-3/pull/243#discussion_r684087234



##########
File path: 
modules/schema/src/main/java/org/apache/ignite/internal/schema/DecimalNativeType.java
##########
@@ -57,13 +57,6 @@ public int scale() {
         return scale;
     }
 
-    /** {@inheritDoc} */
-    @Override public boolean mismatch(NativeType type) {
-        return super.mismatch(type)
-            || precision < ((NumericNativeType)type).precision
-            || scale < ((NumericNativeType)type).scale;

Review comment:
       If we validate here, we will discard even those values that we could 
have stored. 
   For example, there is a special case with zero value string representations:
   
   System.out.println(new BigDecimal("0.00").scale()); //2
   System.out.println(new BigDecimal("0E-2").scale()); //2
   System.out.println(new BigDecimal("0E+2").scale()); //-2
   
   All of these expressions are "zero" and we can definitely store them. But we 
cannot understand this here.




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