AMashenkov commented on a change in pull request #243:
URL: https://github.com/apache/ignite-3/pull/243#discussion_r679905488
##########
File path:
modules/schema/src/main/java/org/apache/ignite/internal/schema/DecimalNativeType.java
##########
@@ -60,8 +60,7 @@ public int scale() {
/** {@inheritDoc} */
@Override public boolean mismatch(NativeType type) {
return super.mismatch(type)
- || precision < ((NumericNativeType)type).precision
- || scale < ((NumericNativeType)type).scale;
+ || precision < ((DecimalNativeType)type).precision;
Review comment:
Agree, we are ok to round up numbers that has higher scale.
But what if user pass a number of higher precision due to it high scale?
E.g. table column type is Decimal(8,2), but user pass 123.123456789.
We detect user number as of Decimal(12,9), but actually, it perfectly fits
to the column type after round up.
Have I missed smth?
--
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]