[
https://issues.apache.org/jira/browse/KAFKA-9517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17031912#comment-17031912
]
Paul Snively edited comment on KAFKA-9517 at 2/6/20 8:40 PM:
-------------------------------------------------------------
John,
Having been sharply critical of the project, now let me thank you for the
speedy response. I'll look at the related issue and PR immediately.
*Update:* [KAFKA-9500|https://issues.apache.org/jira/browse/KAFKA-9500] looks
like an issue a colleague has encountered, so I would say it seems related, but
not quite the same: the behavior my colleague and I have seen first is an NPE
when attempting to `join` on the result of a `join` constructed without an
explicit `Materialized`, because the resulting `KTableImpl`'s `valueSerde` is
`null`. However, my colleague has pushed a bit farther by explicitly passing a
`Materialized` he's constructed, but then he sees the issue reported in
[KAFKA-9500|https://issues.apache.org/jira/browse/KAFKA-9500].
was (Author: psnively):
John,
Having been sharply critical of the project, now let me thank you for the
speedy response. I'll look at the related issue and PR immediately.
*Update:* 9500 looks like an issue a colleague has encountered, so I would say
it seems related, but not quite the same: the behavior my colleague and I have
seen first is an NPE when attempting to `join` on the result of a `join`
constructed without an explicit `Materialized`, because the resulting
`KTableImpl`'s `valueSerde` is `null`. However, my colleague has pushed a bit
farther by explicitly passing a `Materialized` he's constructed, but then he
sees the issue reported in 9500.
> KTable Joins Without Materialized Argument Yield Results That Further Joins
> NPE On
> ----------------------------------------------------------------------------------
>
> Key: KAFKA-9517
> URL: https://issues.apache.org/jira/browse/KAFKA-9517
> Project: Kafka
> Issue Type: Bug
> Components: streams
> Affects Versions: 2.4.0
> Reporter: Paul Snively
> Priority: Critical
>
> The `KTable` API implemented [[here||#L842-L844]]
> [https://github.com/apache/kafka/blob/2.4.0/streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableImpl.java#L842-L844]
> []|#L842-L844]] calls `doJoinOnForeignKey` with an argument of
> `Materialized.with(null, null)`, as apparently do several other APIs. As the
> comment spanning [these lines|#L1098-L1099]] makes clear, the result is a
> `KTable` whose `valueSerde` (as a `KTableImpl`) is `null`. Therefore,
> attempts to `join` etc. on the resulting `KTable` fail with a
> `NullPointerException`.
> While there is an obvious workaround—explicitly construct the required
> `Materialized` and use the APIs that take it as an argument—I have to admit I
> find the existence of public APIs with this sort of bug, particularly when
> the bug is literally documented as a comment in the source code, astonishing
> to the point of incredulity. It calls the quality and trustworthiness of
> Kafka Streams into serious question, and if a resolution is not forthcoming
> within a week, we will be left with no other option but to consider technical
> alternatives.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)