twalthr commented on a change in pull request #12900:
URL: https://github.com/apache/flink/pull/12900#discussion_r456313358



##########
File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/data/util/DataFormatConverters.java
##########
@@ -249,7 +251,15 @@ public static DataFormatConverter 
getConverterForDataType(DataType originDataTyp
                                                
DataTypes.INT().bridgedTo(Integer.class));
                        case ROW:
                        case STRUCTURED_TYPE:
-                               CompositeType compositeType = (CompositeType) 
fromDataTypeToTypeInfo(dataType);
+                               TypeInformation<?> asTypeInfo = 
fromDataTypeToTypeInfo(dataType);
+                               if (asTypeInfo instanceof WrapperTypeInfo && 
clazz == RowData.class) {
+                                       LogicalType realLogicalType = 
((WrapperTypeInfo<?>) asTypeInfo).toLogicalType();
+                                       return new 
RowDataConverter(getFieldCount(realLogicalType));

Review comment:
       All cases that went through 
`TypeInfoDataTypeConverter#fromDataTypeToTypeInfo` e.g. the legacy sinks.




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

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


Reply via email to