dylanhz commented on code in PR #25404:
URL: https://github.com/apache/flink/pull/25404#discussion_r1778335511
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/utils/ValueDataTypeConverter.java:
##########
@@ -126,6 +126,10 @@ private static DataType convertToDecimalType(BigDecimal
decimal) {
// negative scale is not supported, normalize it
return DataTypes.DECIMAL(precision - scale, 0);
}
+
+ if (scale > precision) {
+ return DataTypes.DECIMAL(precision + scale, scale);
Review Comment:
This seems to have some issues, for example, with numbers like `0.011` and
`0.111`.
--
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]