YeonCheolGit commented on code in PR #12803:
URL: https://github.com/apache/kafka/pull/12803#discussion_r1020185247


##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java:
##########
@@ -1046,7 +1047,18 @@ public <VR, KO, VO> KTable<K, VR> leftJoin(final 
KTable<KO, VO> other,
         return doJoinOnForeignKey(other, foreignKeyExtractor, joiner, 
TableJoined.with(null, null), materialized, true);
     }
 
-    @SuppressWarnings("unchecked")
+    private final Function<Optional<Set<Integer>>, Integer> getPartition = 
maybeMulticastPartitions -> {

Review Comment:
   This question might be silly and just wondering that should we use 
`Optional` for this? 
   Because I think as long as not initialise its null, `Set` object cannot be 
null. 
   Even if it is null how about checking just `maybeMulticastPartitions == 
null`?
   
   For me not wrapping optional object seems lighter and clear.
   
   But this is very minor thing and can be ignored:)



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