vpapavas opened a new pull request, #12644:
URL: https://github.com/apache/kafka/pull/12644

   KIP can be found here: 
https://cwiki.apache.org/confluence/display/KAFKA/KIP-862%3A+Self-join
   
   It only applies to Stream-Stream joins and not n-way self-joins. 
   
   This is an inner-join topology (without the optimization)
   ```
   Topologies:
      Sub-topology: 0
       Source: KSTREAM-SOURCE-0000000000 (topics: [topic2])
         --> KSTREAM-WINDOWED-0000000001, KSTREAM-WINDOWED-0000000002
       Processor: KSTREAM-WINDOWED-0000000001 (stores: 
[KSTREAM-JOINTHIS-0000000003-store])
         --> KSTREAM-JOINTHIS-0000000003
         <-- KSTREAM-SOURCE-0000000000
       Processor: KSTREAM-WINDOWED-0000000002 (stores: 
[KSTREAM-JOINOTHER-0000000004-store])
         --> KSTREAM-JOINOTHER-0000000004
         <-- KSTREAM-SOURCE-0000000000
       Processor: KSTREAM-JOINOTHER-0000000004 (stores: 
[KSTREAM-JOINTHIS-0000000003-store])
         --> KSTREAM-MERGE-0000000005
         <-- KSTREAM-WINDOWED-0000000002
       Processor: KSTREAM-JOINTHIS-0000000003 (stores: 
[KSTREAM-JOINOTHER-0000000004-store])
         --> KSTREAM-MERGE-0000000005
         <-- KSTREAM-WINDOWED-0000000001
       Processor: KSTREAM-MERGE-0000000005 (stores: [])
         --> KSTREAM-PROCESSOR-0000000006
         <-- KSTREAM-JOINTHIS-0000000003, KSTREAM-JOINOTHER-0000000004
       Processor: KSTREAM-PROCESSOR-0000000006 (stores: [])
         --> none
         <-- KSTREAM-MERGE-0000000005
   ```
   
![inner-join](https://user-images.githubusercontent.com/7738368/186751759-92899e7f-0bfa-4266-a37d-2c2f70f4dda7.png)
   
   
   and this is the optimized self-join topology
   
   ```
   Topologies:
      Sub-topology: 0
       Source: KSTREAM-SOURCE-0000000000 (topics: [topic1])
         --> KSTREAM-WINDOWED-0000000001
       Processor: KSTREAM-WINDOWED-0000000001 (stores: 
[KSTREAM-JOINTHIS-0000000003-store])
         --> KSTREAM-MERGE-0000000005
         <-- KSTREAM-SOURCE-0000000000
       Processor: KSTREAM-MERGE-0000000005 (stores: 
[KSTREAM-JOINTHIS-0000000003-store])
         --> KSTREAM-PROCESSOR-0000000006
         <-- KSTREAM-WINDOWED-0000000001
       Processor: KSTREAM-PROCESSOR-0000000006 (stores: [])
         --> none
         <-- KSTREAM-MERGE-0000000005
   ```
   
![self-join](https://user-images.githubusercontent.com/7738368/186751945-5f92369c-eea6-4ed1-9c41-7cfaa30ba117.png)
   -----
   Testing: Unit tests (Integration and upgrade test in follow up PR)
   
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to