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


##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamSlidingWindowAggregate.java:
##########
@@ -386,14 +387,14 @@ private void createWindows(final Record<KIn, VIn> record,
 
             // create left window for new record
             if (!leftWinAlreadyCreated) {
-                final ValueAndTimestamp<VAgg> valueAndTime;
+                final ValueTimestampHeaders<VAgg> valueTimestampHeaders;
                 if (leftWindowNotEmpty(previousRecordTimestamp, 
record.timestamp())) {
-                    valueAndTime = ValueAndTimestamp.make(leftWinAgg.value(), 
record.timestamp());
+                    valueTimestampHeaders = 
ValueTimestampHeaders.make(leftWinAgg.value(), record.timestamp(), 
record.headers());
                 } else {
-                    valueAndTime = ValueAndTimestamp.make(initializer.apply(), 
record.timestamp());
+                    valueTimestampHeaders = 
ValueTimestampHeaders.make(initializer.apply(), record.timestamp(), 
record.headers());

Review Comment:
   `new RecordHeaders()` ?



##########
streams/src/main/java/org/apache/kafka/streams/kstream/internals/KStreamSlidingWindowAggregate.java:
##########
@@ -417,8 +418,8 @@ private void createPreviousRecordRightWindow(final long 
windowStart,
                                                      final Record<KIn, VIn> 
record,
                                                      final long closeTime) {
             final TimeWindow window = new TimeWindow(windowStart, windowStart 
+ windows.timeDifferenceMs());
-            final ValueAndTimestamp<VAgg> valueAndTime = 
ValueAndTimestamp.make(initializer.apply(), record.timestamp());
-            updateWindowAndForward(window, valueAndTime, record, closeTime);
+            final ValueTimestampHeaders<VAgg> valueTimestampHeaders = 
ValueTimestampHeaders.make(initializer.apply(), record.timestamp(), 
record.headers());

Review Comment:
   `new RecordHeaders()` ?



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