fuweng11 commented on code in PR #7894:
URL: https://github.com/apache/inlong/pull/7894#discussion_r1174537279


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sink/StreamSinkServiceImpl.java:
##########
@@ -791,11 +794,19 @@ private Map<String, String> parseFieldsBySql(String sql) 
throws JSQLParserExcept
         return fields;
     }
 
-    private Map<String, String> parseFieldsByJson(String statement) throws 
JsonProcessingException {
-        // Use LinkedHashMap deserialization to keep the order of the fields
-        return objectMapper.readValue(statement,
-                new TypeReference<LinkedHashMap<String, String>>() {
-                });
+    private List<SinkField> parseFieldsByJson(String statement) throws 
JsonProcessingException {
+        return objectMapper.readValue(statement, new 
TypeReference<List<Map<String, String>>>() {
+        }).stream().map(line -> {
+            String name = line.get(STREAM_FILED_JSON_NAME_PROP);
+            String type = line.get(STREAM_FILED_JSON_TYPE_PROP);
+            String desc = line.get(STREAM_FILED_JSON_COMMENT_PROP);
+            Map.Entry<String, String> next = line.entrySet().iterator().next();
+            SinkField streamField = new SinkField();

Review Comment:
   `streamField`  -> `sinkField`



-- 
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: commits-unsubscr...@inlong.apache.org

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

Reply via email to