[ 
https://issues.apache.org/jira/browse/KAFKA-13641?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17486804#comment-17486804
 ] 

Mohammad Yousuf Minhaj Zia commented on KAFKA-13641:
----------------------------------------------------

[~mjsax] The backwards compatibility is definitely a problem. One solution 
would be to maintain two sets of functions one with `ValueJoiner` and one 
without but that will get hard to maintain over time as well. Maybe there is an 
abstraction we can abuse to allow both types of `Option` and non-`Option` 
values in a `ValueJoiner`.

I genuinely feel this would improve the safety of the implementations.

Also thanks for pointing out that null values are dropped. If that is the case 
then maybe having `Option` for the specific values of the join will help a lot 
in making people understand the join semantics just by looking at the signature.

> Kafka Streams Scala: Add `Option` to `ValueJoiner` parameters
> -------------------------------------------------------------
>
>                 Key: KAFKA-13641
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13641
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>            Reporter: Mohammad Yousuf Minhaj Zia
>            Priority: Minor
>
> Since `ValueJoiner` right parameter in `leftJoins`, `outerJoins` can be 
> nullable, I am wondering if can wrap them around Scala `Option`.
> However, there is also the concern that the left hand side value can be null 
> in the case of tombstone messages, in which the `Option` semantics can be 
> misleading. I still feel this could be a useful feature in reducing the 
> number of `NullPointerExceptions`.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to