mjsax commented on code in PR #15482:
URL: https://github.com/apache/kafka/pull/15482#discussion_r1729588622
##########
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:
Yes, let's keep the return type of `getPrimaryPartition` unchanged.
However, if `getPrimaryPartition` returns `null`, we should not construct
`Optional.of(Collections.singleton(null)` here, but rather `Optional.empty()`,
right? So we need to change the code here accordingly?
--
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]