caioguedes commented on code in PR #15482:
URL: https://github.com/apache/kafka/pull/15482#discussion_r1728834219
##########
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:
@mjsax, about the overloaded, let put it aside, as you mentioned better keep
it simple.
About `getPrimaryPartition` we should use `Optional.empty()` in this case,
and `Optional.ofNullable()` for the constructor parameter.
However about the returning type change in `getPrimaryPartition`, I've
noticed that `SubscriptionResponseWrapper` is serialized, do we should concern
about the type change in this case?
--
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]