mjsax commented on code in PR #12037:
URL: https://github.com/apache/kafka/pull/12037#discussion_r849978267


##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamSlidingWindowAggregate.java:
##########
@@ -50,17 +59,27 @@
     private final SlidingWindows windows;
     private final Initializer<VAgg> initializer;
     private final Aggregator<? super KIn, ? super VIn, VAgg> aggregator;
+    private final EmitStrategy emitStrategy;
 
     private boolean sendOldValues = false;
 
     public KStreamSlidingWindowAggregate(final SlidingWindows windows,
                                          final String storeName,
                                          final Initializer<VAgg> initializer,
                                          final Aggregator<? super KIn, ? super 
VIn, VAgg> aggregator) {
+        this(windows, storeName, EmitStrategy.onWindowUpdate(), initializer, 
aggregator);

Review Comment:
   Would it be cleaner to remove this constructor and force the caller to alway 
pass in an `EmitStrategy`?
   
   (Maybe same for hopping/tumbling windows?)



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