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



##########
File path: 
modules/schema/src/main/java/org/apache/ignite/internal/schema/configuration/SchemaDescriptorConverter.java
##########
@@ -151,11 +160,13 @@ private static Serializable convertDefault(NativeType 
type, String dflt) {
             case DOUBLE:
                 return Double.parseDouble(dflt);
             case DECIMAL:
-                return new BigDecimal(dflt);
+                return new 
BigDecimal(dflt).setScale(((DecimalNativeType)type).scale(), 
RoundingMode.HALF_UP);

Review comment:
       SQL standard does not specify whether number should be rounded or 
truncated.
   But we must mention this in documentation and ColumnType javadoc.




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