Switched from an inner to a left join
authorKai Moritz <kai@juplo.de>
Sat, 6 Jul 2024 07:21:45 +0000 (09:21 +0200)
committerKai Moritz <kai@juplo.de>
Wed, 17 Jul 2024 05:16:22 +0000 (07:16 +0200)
pom.xml
src/test/java/de/juplo/kafka/streams/join/stream/stream/StreamStreamLeftJoinTest.java

diff --git a/pom.xml b/pom.xml
index 6063371..4e264b6 100644 (file)
--- a/pom.xml
+++ b/pom.xml
        </parent>
 
        <groupId>de.juplo.kafka.streams.demos</groupId>
-       <artifactId>stream-stream--inner-join</artifactId>
+       <artifactId>stream-stream--left-join</artifactId>
        <version>1.0.0-SNAPSHOT</version>
 
-       <name>Outcome of an Inner Stream/Stream-Join</name>
+       <name>Outcome of a Left Stream/Stream-Join</name>
 
        <properties>
                <java.version>21</java.version>
index 09410b4..93cc03d 100644 (file)
@@ -33,7 +33,7 @@ public class StreamStreamLeftJoinTest
     KStream<String, String> right = builder.stream(RIGHT);
 
     left
-        .join(
+        .leftJoin(
             right,
             (valueLeft, valueRight) -> valueLeft + "-" + valueRight,
             WINDOWS)
@@ -90,10 +90,10 @@ public class StreamStreamLeftJoinTest
     assertThatOutcomeIs();
 
     sendLeftAt("F", 120);
-    assertThatOutcomeIs();
+    assertThatOutcomeIs("E-null");
 
     sendRightAt("f", 140);
-    assertThatOutcomeIs();
+    assertThatOutcomeIs("F-null");
 
     sendLeftAt("G", 160);
     assertThatOutcomeIs();