You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/11/27 15:14:03 UTC

[GitHub] [inlong] healchow commented on a diff in pull request #6641: [INLONG-6639][Sort] Fix DynamicPulsarDeserializationSchema deserialize NPE problem when sourceMetricData is not initialized

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


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



-- 
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-unsubscribe@inlong.apache.org

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