zhangjun0x01 commented on code in PR #1026:
URL: https://github.com/apache/incubator-paimon/pull/1026#discussion_r1177564697
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/action/cdc/mysql/MySqlDebeziumJsonEventParser.java:
##########
@@ -200,18 +203,27 @@ public List<CdcRecord> getRecords() {
}
private Map<String, String> extractRow(JsonNode recordRow) {
- Map<String, String> recordMap =
- objectMapper.convertValue(recordRow, new
TypeReference<Map<String, String>>() {});
- if (recordMap == null) {
+
+ // the geometry,point type can not be converted to string, so we
convert it to Object first.
+ Map<String, Object> jsonMap =
+ objectMapper.convertValue(recordRow, new
TypeReference<Map<String, Object>>() {});
+
+ if (jsonMap == null) {
return new HashMap<>();
}
+ Map<String, String> resultMap = new HashMap<>();
+ for (Map.Entry<String, Object> field : jsonMap.entrySet()) {
Review Comment:
This is for the convenience of handling the subsequent logic. The `oldValue`
required in the for loop is a string type, and the return value is
`Map<String, String>`. Therefore, we need to convert `Map<String, Object>` to
`Map<String, String>`
--
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]