hanyuzheng7 opened a new pull request, #14745:
URL: https://github.com/apache/kafka/pull/14745

   KIP-997: 
https://cwiki.apache.org/confluence/display/KAFKA/KIP-997%3A++Support+fetch%28fromKey%2C+toKey%2C+from%2C+to%29+to+WindowRangeQuery+and+unify+WindowKeyQuery+and+WindowRangeQuery
   
   We aim to enhance the WindowRangeQuery  by supporting a new method: 
fetch(keyFrom, keyTo, from, to). Currently, WindowRangeQuery  utilizes 
KeyValueIterator<Windowed<K>, V> fetchAll(Instant timeFrom, Instant timeTo)  
for retrieving all key-value pairs within a specified time range. However, we 
propose to use KeyValueIterator<Windowed<K>, V> fetch(K keyFrom, K keyTo, 
Instant timeFrom, Instant timeTo)  instead. This new method will provide a 
KeyValueIterator<Windowed<K>, V>  that allows users to iterate over windowed 
key-value pairs {{
   
   {<Windowed<K>, value>}
   }} , spanning the entire time range.
   
   With this new method, users can retrieve window sessions for specific keys, 
rather than all keys, which enables a more targeted query. This is an 
improvement over the fetchAll  method, which only allows retrieval of all key's 
window sessions without the ability to specify a range of keys.
   
   Additionally, this enhancement also allows the WindowRangeQuery  to support 
WindowKeyQuery  functionality. Users seeking to query window sessions for a 
specific key can do so by setting keyFrom  and keyTo  to be equal. This dual 
functionality provides more flexibility and efficiency in querying windowed 
keys.
   
    
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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