hequn8128 commented on a change in pull request #10086: [FLINK-14584][python]
Support complex data types in Python user-defined functions
URL: https://github.com/apache/flink/pull/10086#discussion_r354199786
##########
File path:
flink-python/src/main/java/org/apache/flink/table/runtime/typeutils/PythonTypeUtils.java
##########
@@ -131,6 +187,29 @@ public TypeSerializer visit(DateType dateType) {
return DateSerializer.INSTANCE;
}
+ @Override
+ @SuppressWarnings("unchecked")
+ public TypeSerializer visit(ArrayType arrayType) {
+ LogicalType elementType = arrayType.getElementType();
+ TypeSerializer<?> elementTypeSerializer =
elementType.accept(this);
+ Class<?> elementClass =
LogicalTypeToConversionClassConverter.INSTANCE.visit(elementType);
Review comment:
It seems we don't need to add the `LogicalTypeToConversionClassConverter`
class. We can use `TypeConversions` to convert the LogicalType to the array
TypeInformation and then convert to the serializer.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services