Greg Harris created KAFKA-16362:
-----------------------------------
Summary: 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
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)