mjsax commented on code in PR #15482:
URL: https://github.com/apache/kafka/pull/15482#discussion_r1729590669


##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java:
##########
@@ -1229,7 +1229,7 @@ private <VR, KO, VO> KTable<K, VR> 
doJoinOnForeignKey(final KTable<KO, VO> forei
 
         final StreamPartitioner<K, SubscriptionResponseWrapper<VO>> 
foreignResponseSinkPartitioner =
                 tableJoinedInternal.partitioner() == null
-                        ? (topic, key, subscriptionResponseWrapper, 
numPartitions) -> subscriptionResponseWrapper.getPrimaryPartition()
+                        ? (topic, key, subscriptionResponseWrapper, 
numPartitions) -> 
Optional.of(Collections.singleton(subscriptionResponseWrapper.getPrimaryPartition()))

Review Comment:
   As a matter of fact, we have a failing test that I believe exactly exposes 
this bug:
   ```
   java.lang.NullPointerException
        at 
org.apache.kafka.streams.processor.internals.RecordCollectorImpl.send(RecordCollectorImpl.java:163)
        at 
org.apache.kafka.streams.processor.internals.RecordCollectorTest.shouldUseDefaultPartitionerAsPartitionReturnsNull(RecordCollectorTest.java:606)
   ```



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