showuon commented on a change in pull request #11195:
URL: https://github.com/apache/kafka/pull/11195#discussion_r685830364



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/kstream/BranchedKStream.java
##########
@@ -69,7 +69,8 @@
  *     .branch(predicate1, Branched.as("bar"))                    // "foo-bar"
  *     .branch(predicate2, Branched.withConsumer(ks->ks.to("A"))  // no entry: 
a Consumer is provided
  *     .branch(predicate3, Branched.withFunction(ks->null))       // no entry: 
chain function returns null
- *     .branch(predicate4)                                        // "foo-4": 
name defaults to the branch position
+ *     .branch(predicate4, Branched.withFunction(ks->ks))         // "foo-4": 
chain function returns non-null value
+ *     .branch(predicate5)                                        // "foo-5": 
name defaults to the branch position

Review comment:
       add an example to explain the function return with non-null result 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]


Reply via email to