ableegoldman commented on code in PR #18111:
URL: https://github.com/apache/kafka/pull/18111#discussion_r1879317228


##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamKStreamJoin.java:
##########
@@ -77,10 +85,21 @@ abstract class KStreamKStreamJoin<K, VLeft, VRight, VOut, 
VThis, VOther> impleme
         this.enableSpuriousResultFix = windows.spuriousResultFixEnabled();
         this.joiner = joiner;
         this.outer = outer;
-        this.outerJoinWindowName = outerJoinWindowName;
+        this.outerJoinWindowStoreName = 
outerJoinWindowStoreFactory.map(StoreFactory::storeName);
+        this.outerJoinWindowStoreFactory = outerJoinWindowStoreFactory;
         this.sharedTimeTrackerSupplier = sharedTimeTrackerSupplier;
     }
 
+    @Override
+    public Set<StoreBuilder<?>> stores() {
+        final Set<StoreBuilder<?>> stores = new HashSet<>();
+        stores.add(new FactoryWrappingStoreBuilder<>(otherWindowStoreFactory));
+        if (outerJoinWindowStoreFactory.isPresent() && 
enableSpuriousResultFix) {

Review Comment:
   ~yes, that's true. I think the `outerJoinWindowStoreFactory.isPresent()` 
check is just to avoid the warning about calling 
`outerJoinWindowStoreFactory.get()`?~
   
   ~But actually we should just throw an exception if 
`spuriousResultFixEnabled` is true without the corresponding store~
   
   ~(just to clarify the outer join factory exists for all left/outer joins, 
regardless of spuriousResultFixEnabled , but the spurious results fix is only 
enabled for left/outer joins so that's why the store should always exist when 
spuriousResultFixEnabled is true)~
   
   ok actually we do indeed need the `outerJoinWindowStoreFactory.isPresent()` 
check, because `enableSpuriousResultFix` does not in fact take into account 
whether it's an outer join or not. The flag is simply set to true anytime 
anyone uses the more recent version of JoinWindows. I'll leave a comment 
explaining this



-- 
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