AyoubOm commented on code in PR #19303:
URL: https://github.com/apache/kafka/pull/19303#discussion_r2029817657


##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/foreignkeyjoin/SubscriptionSendProcessorSupplier.java:
##########
@@ -143,28 +143,25 @@ private void leftJoinInstructions(final Record<KLeft, 
Change<VLeft>> record) {
 
         private void defaultJoinInstructions(final Record<KLeft, 
Change<VLeft>> record) {
             if (record.value().oldValue != null) {
-                final KRight oldForeignKey = record.value().oldValue == null ? 
null : foreignKeyExtractor.extract(record.key(), record.value().oldValue);
-                if (oldForeignKey == null) {
+                final KRight oldForeignKey = 
foreignKeyExtractor.extract(record.key(), record.value().oldValue);

Review Comment:
   I don't get your point. Let me rephrase my comment if I am missing something.
   
   If the previous statement of line `146`:
   
   `final KRight oldForeignKey = record.value().oldValue == null ? null : 
foreignKeyExtractor.extract(record.key(), record.value().oldValue);` 
   
   is inside the if block of line `145` (case of old Foreign key existing and 
non-null), it means the condition of line `146`:
   
   `record.value().oldValue == null ?` would never evaluate to true and we will 
always call the `foreignKeyExtractor` with a non-null value ?



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