[
https://issues.apache.org/jira/browse/KAFKA-16362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17825397#comment-17825397
]
Greg Harris commented on KAFKA-16362:
-------------------------------------
cc [~mjsax] [~ableegoldman] I looked through the (currently ignored) rawtypes
warnings in Streams and this was one that I really didn't have a simple
resolution for, and I think needs a real refactor to make type-safe.
I don't think there's a bug hidden here, but the code didn't give me any
confidence on that. I adjusted a test to prove to myself that the current
implementation is correct, even if it is type-unsafe:
[https://github.com/apache/kafka/pull/15513]
Given the number of times that rawtypes are used in Streams internals, I wasn't
sure if this was even a concern for you, and if you're interested in reducing
the number of rawtypes used in streams over the long term.
> Fix type-unsafety in KStreamKStreamJoin caused by isLeftSide
> ------------------------------------------------------------
>
> Key: KAFKA-16362
> URL: https://issues.apache.org/jira/browse/KAFKA-16362
> Project: Kafka
> Issue Type: Task
> Components: streams
> Affects Versions: 3.7.0
> Reporter: Greg Harris
> Priority: Trivial
> Labels: newbie++
>
> The implementation of KStreamKStreamJoin has several places that the compiler
> emits warnings for, that are later suppressed or ignored:
> * LeftOrRightValue.make returns a raw LeftOrRightValue without generic
> arguments, because the generic type arguments depend on the boolean input.
> * Calling LeftOrRightValue includes an unchecked cast before inserting the
> record into the outerJoinStore
> * emitNonJoinedOuterRecords swaps the left and right values, and performs an
> unchecked cast
> These seem to be closely related to the isLeftSide variable, which makes the
> class behave differently whether it is present on the left or right side of a
> join.
> We should figure out if these warnings can be eliminated by a refactor,
> perhaps into KStreamKstreamJoin.Left and KStreamKStreamJoin.Right, or with
> some generic arguments.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)