wuchong commented on code in PR #23012:
URL: https://github.com/apache/flink/pull/23012#discussion_r1266939659


##########
flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/canal/CanalJsonDeserializationSchema.java:
##########
@@ -230,7 +230,7 @@ public void deserialize(@Nullable byte[] message, 
Collector<RowData> out) throws
                     return;
                 }
             }
-            final GenericRowData row = (GenericRowData) 
jsonDeserializer.convertToRowData(root);
+            final GenericRowData row = (GenericRowData) 
jsonDeserializer.deserialize(message);

Review Comment:
   This looks like we deserialize the json bytes twice. It seems 
`JsonRowDataDeserializationSchema` is used in many places. Can we keep 
compatibility for the `JsonRowDataDeserializationSchema` and create a new 
deserializer for Json Stream Parser? (e.g., 
`JsonRowDataProjectedDeserializationSchema` and 
`JsonToRowDataProjectedConverters`).  We only need to upgrade JsonFormatFactory 
to use the new deserializer. And Canal/Debezium can be updated in the future. 



-- 
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: issues-unsubscr...@flink.apache.org

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

Reply via email to