Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-16362

Fix type-unsafety in KStreamKStreamJoin caused by isLeftSide

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.7.0
    • 3.8.0
    • streams

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              raminqaf Ramin Gharib
              gharris1727 Greg Harris
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: