gong commented on code in PR #5318:
URL: https://github.com/apache/inlong/pull/5318#discussion_r935074293


##########
inlong-sort/sort-core/src/main/java/org/apache/inlong/sort/parser/impl/FlinkSqlParser.java:
##########
@@ -159,6 +162,23 @@ private void parseStream(StreamInfo streamInfo) {
         log.info("parse stream success, streamId:{}", 
streamInfo.getStreamId());
     }
 
+    /**
+     * Inject the `inlong.metric` for ExtractNode or LoadNode
+     *
+     * @param streamInfo The encapsulation of nodes and node relations
+     */
+    private void injectInLongMetric(StreamInfo streamInfo) {
+        streamInfo.getNodes().stream().filter(node -> node instanceof 
InLongMetric).forEach(node -> {
+            Map<String, String> properties = node.getProperties();
+            if (properties == null) {
+                properties = new LinkedHashMap<>();
+            }

Review Comment:
   if properties is null, new LinkedHashMap should be writed back to node by 
node.setProperties



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

Reply via email to