You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (Jira)" <ji...@apache.org> on 2025/01/04 01:15:00 UTC

[jira] [Assigned] (KAFKA-15795) Support fetch(fromKey, toKey, from, to) to WindowRangeQuery and unify WindowKeyQuery and WindowRangeQuery

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

Matthias J. Sax reassigned KAFKA-15795:
---------------------------------------

    Assignee:     (was: Hanyu Zheng)

> 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
>            Priority: Major
>              Labels: kip
>
> 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)