twalthr commented on code in PR #24981: URL: https://github.com/apache/flink/pull/24981#discussion_r1808198097
########## flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/utils/ValueDataTypeConverter.java: ########## @@ -119,8 +121,8 @@ private static DataType convertToBinaryType(byte[] bytes) { } private static DataType convertToDecimalType(BigDecimal decimal) { - final int precision = decimal.precision(); final int scale = decimal.scale(); + final int precision = max(decimal.precision(), scale); Review Comment: Please add a test. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org