[
https://issues.apache.org/jira/browse/KAFKA-12845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352903#comment-17352903
]
Pedro Gontijo commented on KAFKA-12845:
---------------------------------------
Got it. But if you look at the code before the change you will see that its
behavior was exactly what you have suggested in
(https://issues.apache.org/jira/browse/KAFKA-12317). It was already there.
KStream->KTable *and* KStream->GlobalKTable were both ok with null join-keys on
left join scenarios.
The change proposed by KAFKA-10277 is totally ok, but actually, the code change
was beyond the proposed when instead of just removing "key == null" from
condition "if (*key* == null || value == null)" at line 69, it made it "if
(*mappedKey* == null || value == null)".
So, yes, this can be closed, but I would definitely advocate for K12317 to be a
bug fix because what we have now in 2.7.x is not only changing behavior (in a
negative way I think) but also affecting performance by querying the state
store unnecessarily.
> Rollback change which requires join key to be non null on
> KStream->GlobalKTable
> -------------------------------------------------------------------------------
>
> Key: KAFKA-12845
> URL: https://issues.apache.org/jira/browse/KAFKA-12845
> Project: Kafka
> Issue Type: Improvement
> Components: streams
> Affects Versions: 2.7.0
> Reporter: Pedro Gontijo
> Priority: Major
>
> As part of [KAFKA-10277|https://issues.apache.org/jira/browse/KAFKA-10277]
> the behavior for KStream->GlobalKtable joins was changed to require non null
> join keys.
> But it seems reasonable that not every record will have an existing
> relationship (and hence a key) with the join globalktable. Think about a
> User>Car for instance, or PageView>Product. An empty/zero key could be
> returned by the KeyMapper but that will make a totally unnecessary search
> into the store.
> I do not think that makes sense for any GlobalKtable join (inner or left) but
> for left join it sounds even more strange.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)