hequn8128 commented on a change in pull request #11020: [FLINK-15913][python] Add Python TableFunction Runner and Operator in old planner URL: https://github.com/apache/flink/pull/11020#discussion_r375780067
########## File path: flink-python/src/main/java/org/apache/flink/table/runtime/typeutils/PythonTypeUtils.java ########## @@ -90,6 +91,39 @@ public static TypeSerializer toBlinkTypeSerializer(LogicalType logicalType) { return logicalType.accept(new LogicalTypeToProtoTypeConverter()); } + public static TypeSerializer toFlinkTableTypeSerializer(LogicalType logicalType) { + RowType rowType = (RowType) logicalType; + LogicalTypeDefaultVisitor<TypeSerializer> converter = + new LogicalTypeToTypeSerializerConverter(); + final TypeSerializer[] fieldTypeSerializers = rowType.getFields() + .stream() + .map(f -> f.getType().accept(converter)) + .toArray(TypeSerializer[]::new); + return new RowTableSerializer(fieldTypeSerializers); + } + + public static FlinkFnApi.Schema.FieldType toTableProtoType(LogicalType logicalType) { Review comment: Rename method name to `toTableFunctionProtoType ` ---------------------------------------------------------------- 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 With regards, Apache Git Services