dylanhz commented on code in PR #24981:
URL: https://github.com/apache/flink/pull/24981#discussion_r1810623732


##########
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:
   A pull request regarding this issue has been merged (see [PR 
#25404](https://github.com/apache/flink/pull/25404)). However, I have some 
concerns about its solution. Could you please have a look?



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

Reply via email to