mjsax commented on code in PR #14523: URL: https://github.com/apache/kafka/pull/14523#discussion_r1360050468
########## streams/src/test/java/org/apache/kafka/streams/integration/IQv2StoreIntegrationTest.java: ########## @@ -716,7 +718,7 @@ public void process(final Record<Integer, Integer> record) { final SessionStore<Integer, Integer> stateStore = context().getStateStore(sessionStoreStoreBuilder.name()); stateStore.put( - new Windowed<>(record.key(), new SessionWindow(WINDOW_START, WINDOW_START)), + new Windowed<>(record.key(), new SessionWindow(record.timestamp(), record.timestamp())), Review Comment: We should add a comment above this line: ``` // we do not re-implement the actual session-window logic from the DSL here to keep the test simple, // but instead just put each record into it's own session ``` ########## streams/src/test/java/org/apache/kafka/streams/integration/IQv2StoreIntegrationTest.java: ########## @@ -1071,16 +1568,51 @@ public <V> void shouldHandleKeyQuery( assertThrows(IllegalArgumentException.class, queryResult::getFailureReason); assertThrows( - IllegalArgumentException.class, - queryResult::getFailureMessage + IllegalArgumentException.class, + queryResult::getFailureMessage ); final V result1 = queryResult.getResult(); final Integer integer = valueExtactor.apply(result1); assertThat(integer, is(expectedValue)); assertThat(queryResult.getExecutionInfo(), is(empty())); assertThat(queryResult.getPosition(), is(POSITION_0)); - } + } + + public <V> void shouldHandleKeyPAPIQuery( Review Comment: Maybe I missed it, but how is this method different to `shouldHandleKeyDSLQuery` ? -- Do we really need to versions of exiting `shouldHandleKeyQuery` ? ########## streams/src/test/java/org/apache/kafka/streams/integration/IQv2StoreIntegrationTest.java: ########## @@ -671,7 +673,7 @@ public void process(final Record<Integer, Integer> record) { public void process(final Record<Integer, Integer> record) { final WindowStore<Integer, Integer> stateStore = context().getStateStore(windowStoreStoreBuilder.name()); - stateStore.put(record.key(), record.value(), WINDOW_START); + stateStore.put(record.key(), record.value(), (record.timestamp() / WINDOW_SIZE.toMillis()) * WINDOW_SIZE.toMillis()); Review Comment: We should add the same comment as above. ########## streams/src/test/java/org/apache/kafka/streams/integration/IQv2StoreIntegrationTest.java: ########## @@ -655,7 +657,7 @@ public void process(final Record<Integer, Integer> record) { ValueAndTimestamp.make( record.value(), record.timestamp() Review Comment: We should add a comment here: ``` // We don't re-implement the DSL logic (which implements sum) but instead just keep the lasted value per window ``` -- 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