You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/09/23 05:41:14 UTC

[GitHub] [incubator-seatunnel] ashulin commented on a diff in pull request #2846: [SeaTunnel][Flink]fixed data stream transform to table not support BigDecimalTypeInfo

ashulin commented on code in PR #2846:
URL: https://github.com/apache/incubator-seatunnel/pull/2846#discussion_r978281405


##########
seatunnel-translation/seatunnel-translation-flink/src/main/java/org/apache/seatunnel/translation/flink/utils/TypeConverterUtils.java:
##########
@@ -57,6 +59,7 @@ public class TypeConverterUtils {
         BRIDGED_TYPES.put(Float.class, BridgedType.of(BasicType.FLOAT_TYPE, BasicTypeInfo.FLOAT_TYPE_INFO));
         BRIDGED_TYPES.put(Double.class, BridgedType.of(BasicType.DOUBLE_TYPE, BasicTypeInfo.DOUBLE_TYPE_INFO));
         BRIDGED_TYPES.put(Void.class, BridgedType.of(BasicType.VOID_TYPE, BasicTypeInfo.VOID_TYPE_INFO));
+        BRIDGED_TYPES.put(BigDecimal.class, BridgedType.of(new DecimalType(38, 18), BasicTypeInfo.BIG_DEC_TYPE_INFO));

Review Comment:
   This will lead to loss of precision. I checked the flink code and found that flink's TypeInfoDataTypeConverter does not handle BigDecimalTypeInfo



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org