ziyanTOP opened a new issue, #663:
URL: https://github.com/apache/doris-flink-connector/issues/663

   ## Problem Summary
   
   When using `mongodb-sync-database`, Debezium may serialize `fullDocument` as 
a JSON string (TextNode) instead of an ObjectNode. The current 
`MongoJsonDebeziumDataChange.extractAfterRow()` directly passes this TextNode 
to `JsonNodeExtractUtil.extractAfterRow()`, which expects an ObjectNode, 
causing `ClassCastException` or deserialization errors.
   
   ## Root Cause
   
   `extractAfterRow()` does not check if the `fullDocument` field is a 
TextNode. When it is a textual JSON string, it should be parsed into an 
ObjectNode first.
   
   ## Proposed Changes
   
   Add a check in `extractAfterRow()`: if `dataNode` is textual, parse it with 
`ObjectMapper.readTree()` before extracting row data.
   
   ## Checklist
   
   1. Does it affect the original behavior: No
   2. Has unit tests been added: No
   3. Has document been added or modified: No Need
   4. Does it need to update dependencies: No
   5. Are there any changes that cannot be rolled back: No


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to