[ 
https://issues.apache.org/jira/browse/KAFKA-15795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hanyu Zheng updated KAFKA-15795:
--------------------------------
    Description: 
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(k{}}}ey{{{}From, keyT{}}}o{{{}, 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.

 

  was:
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]

 

 


> Support fetch(fromKey, toKey, from, to) to WindowRangeQuery and unify 
> WindowKeyQuery and WindowRangeQuery
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-15795
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15795
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>            Reporter: Hanyu Zheng
>            Assignee: Hanyu Zheng
>            Priority: Major
>              Labels: kip
>             Fix For: 3.7.0
>
>
> 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(k{}}}ey{{{}From, keyT{}}}o{{{}, 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.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to