[ https://issues.apache.org/jira/browse/KAFKA-10277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17166561#comment-17166561 ]
Matthias J. Sax commented on KAFKA-10277: ----------------------------------------- {quote}Could I pick this up? {quote} Absolutely. {quote} it also looks like there's no check to enforce that the {{keySelector}} returns a non-null join key. {quote} Well, there is (at least partly). Exactly the line you highlighted. If the returned `mappedKey` is `null`, we don't call `getValueOrNull()`, ie, if the key is `null` we don't do the table lookup. And I think we need to keep this check. – But you are right that we would still emit the input record if we use a leftJoin what sound incorrect. Also note, that the Processor is used to stream-table and stream-globalTable join and thus we need to ensure that it works correctly for both cases. For the stream-table join, the provided `keyMapper` is just the key-identify function `(k,v) -> k`. But I would defer the detailed discussion for the PR review? > Relax non-null key requirement for KStream-GlobalKTable joins > ------------------------------------------------------------- > > Key: KAFKA-10277 > URL: https://issues.apache.org/jira/browse/KAFKA-10277 > Project: Kafka > Issue Type: Improvement > Components: streams > Reporter: Matthias J. Sax > Assignee: Joel Wee > Priority: Major > Labels: beginner, newbie > > In general, Kafka Streams requires that key and value are non-null for > aggregations and join input records. While this requirement is reasonable in > general, for KStream-GlobalKTable joins it's questionable for the stream > input record key. The join is based on a `keySelector` and it seems to be > sufficient to require that the `keySelector` returns a not-null join-key for > the stream record. > We should consider to relax the non-null key requirement for stream-side > input records. -- This message was sent by Atlassian Jira (v8.3.4#803005)