Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The only available alternative is to aggregate all the distinct keys into a single key for a given window, or to implement your own windowed state store. 

 

Public Interfaces

...

This KIP would add the following method to the ReadOnlyWindowStore interface

Code Block
WindowStoreIterator<V>WindowStoreIterator<KeyValue<K, V>> fetch(K from, K to, long timeFrom, long timeTo)

...

This KIP proposes to add the interface described above and implement range scan returning all the entries in the given key range that also match the given time interval. 

Compatibility, Deprecation, and Migration Plan

 

  • Users implementing their own windowed state stores would be affected by the interface changes.

Rejected Alternatives

NoneArguably, the return type is not ideal, since WindowStoreIterator is already a KeyValueIterator which abuses the key as a timestamp and the value as the object of interest. However, given that the existing API already abuses the iterator in a similar way, and barring more invasive changes to the API, or the introduction of type that embeds all of timestamp, key, and value – which would probably be a much larger discussion in itself – it seemed simpler to follow the existing model.