yunqingmoswu commented on code in PR #6641:
URL: https://github.com/apache/inlong/pull/6641#discussion_r1033089189


##########
inlong-sort/sort-connectors/pulsar/src/main/java/org/apache/inlong/sort/pulsar/table/DynamicPulsarDeserializationSchema.java:
##########
@@ -126,7 +126,9 @@ public void deserialize(Message<RowData> message, 
Collector<RowData> collector)
         // also not for a cartesian product with the keys
         if (keyDeserialization == null && !hasMetadata) {
             valueDeserialization.deserialize(message.getData(), new 
CallbackCollector<>(inputRow -> {
-                sourceMetricData.outputMetricsWithEstimate(inputRow);
+                if (sourceMetricData != null) {

Review Comment:
   > Should the code complete the initialization of sourceMetricData before 
entering here? @yunqingmoswu PTAL.
   
   It should be initialized before use, but the indicator is optional. After 
initialization, the source may still be null, so it is reasonable to add 
non-null judgment here.
   <img width="996" alt="image" 
src="https://user-images.githubusercontent.com/44659300/204184285-484df310-dbd9-49b7-8499-ab9e4b96f181.png";>



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