aliehsaeedii commented on code in PR #21830:
URL: https://github.com/apache/kafka/pull/21830#discussion_r3578459239
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/TimestampedToHeadersStoreAdapter.java:
##########
@@ -201,29 +201,29 @@ public byte[] get(final Bytes key) {
@Override
public KeyValueIterator<Bytes, byte[]> range(final Bytes from,
final Bytes to) {
- return new TimestampedToHeadersIteratorAdapter<>(store.range(from,
to));
+ return
MappingKeyValueIteratorAdapter.timestampedToHeaders(store.range(from, to));
Review Comment:
There is no `TimestampedToHeadersStoreAdapterTest,` so no test asserts these
methods wire the timestampedToHeaders conversion rather than plainToHeaders.
The plain and session siblings just got value-conversion checks, could we
add the analogous value-conversion test for the timestamped adapter.
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/PlainToHeadersWindowStoreAdapter.java:
##########
@@ -80,76 +80,76 @@ public byte[] fetch(final Bytes key, final long timestamp) {
@Override
public WindowStoreIterator<byte[]> fetch(final Bytes key, final long
timeFrom, final long timeTo) {
- return new PlainToHeadersWindowStoreIteratorAdapter(store.fetch(key,
timeFrom, timeTo));
+ return
MappingKeyValueIteratorAdapter.plainToHeadersWindow(store.fetch(key, timeFrom,
timeTo));
Review Comment:
The window-store adapter tests only exercise `query()`, never
`fetch`/`backwardFetch`/`fetchAll`, so the methods now calling the new window
factories aren't covered. A test that calls `fetch` and asserts the converted
value would close the gap.
--
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]