raminqaf commented on code in PR #15601:
URL: https://github.com/apache/kafka/pull/15601#discussion_r1600088096


##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamKStreamJoin.java:
##########
@@ -43,7 +42,7 @@
 import static 
org.apache.kafka.streams.StreamsConfig.InternalConfig.EMIT_INTERVAL_MS_KSTREAMS_OUTER_JOIN_SPURIOUS_RESULTS_FIX;
 import static 
org.apache.kafka.streams.processor.internals.metrics.TaskMetrics.droppedRecordsSensor;
 
-class KStreamKStreamJoin<K, V1, V2, VOut> implements ProcessorSupplier<K, V1, 
K, VOut> {
+abstract class KStreamKStreamJoin<K, VL, VR, VOut, VThis, VOther> implements 
ProcessorSupplier<K, VThis, K, VOut> {

Review Comment:
   It is more tangible if we look at the abstract methods:
   ```java
   protected abstract VThis getThisValue(final LeftOrRightValue<? extends 
VLeft, ? extends VRight> leftOrRightValue);
   
   protected abstract VOther getOtherValue(final LeftOrRightValue<? extends 
VLeft, ? extends VRight> leftOrRightValue);
   ```
   Depending on which join side implements these methods, `VThis` and `VOther` 
can change. For instance, the getThisValue on the _left side_ of the join would 
be:
   ```java
    @Override
   public VLeft getThisValue(final LeftOrRightValue<? extends VLeft, ? extends 
VRight> leftOrRightValue) {
         return leftOrRightValue.getLeftValue();
   }
   ```
   Respectively, on the _right side_ we have
   ```java
     @Override
     public VRight getThisValue(final LeftOrRightValue<? extends VLeft, ? 
extends VRight> leftOrRightValue) {
         return leftOrRightValue.getRightValue();
     }
     ````



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to