JingsongLi commented on a change in pull request #11236: 
[FLINK-16269][FLINK-16108][table-planner-blink] Fix schema of query and sink do 
not match when generic or POJO type is requested
URL: https://github.com/apache/flink/pull/11236#discussion_r386802135
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/SinkCodeGenerator.scala
 ##########
 @@ -83,8 +86,10 @@ object SinkCodeGenerator {
             inputRowType,
             inputTerm,
             inputFieldMapping = Option(mapping))
+        val outputBaseRowType = new BaseRowTypeInfo(
+          getCompositeTypes(pojo).map(fromTypeInfoToLogicalType): _*)
 
 Review comment:
   It is pojo now, don't need `getCompositeTypes`.
   Just `RowType.of((0 until ct.getArity).map(ct.getTypeAt).toArray)`.

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

Reply via email to