mjsax commented on code in PR #15482:
URL: https://github.com/apache/kafka/pull/15482#discussion_r1730427271
##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java:
##########
@@ -1230,7 +1230,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) ->
Optional.of(Collections.singleton(subscriptionResponseWrapper.getPrimaryPartition()))
+ ? (topic, key, val, numPartitions) ->
val.getPrimaryPartition() == null ? Optional.empty() :
Optional.of(Collections.singleton(val.getPrimaryPartition()))
Review Comment:
Why did you rename `subscriptionResponseWrapper` to `val`? The old name seem
to be much more descriptive.
Nit: should we call `val.getPrimaryPartition()` twice as the code does now,
or better introduce a variable which stores the result and only call it once?
--
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]