ableegoldman commented on a change in pull request #9138:
URL: https://github.com/apache/kafka/pull/9138#discussion_r481519774



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyWindowStore.java
##########
@@ -136,34 +174,64 @@
      * <p>
      * This iterator must be closed after use.
      *
-     * @param from      the first key in the range
-     * @param to        the last key in the range
-     * @param fromTime  time range start (inclusive)
-     * @param toTime    time range end (inclusive)
-     * @return an iterator over windowed key-value pairs {@code <Windowed<K>, 
value>}
+     * @param from     the first key in the range
+     * @param to       the last key in the range
+     * @param timeFrom time range start (inclusive), where iteration starts.
+     * @param timeTo   time range end (inclusive), where iteration ends.
+     * @return an iterator over windowed key-value pairs {@code <Windowed<K>, 
value>}, from beginning to end of time.
      * @throws InvalidStateStoreException if the store is not initialized
-     * @throws NullPointerException If {@code null} is used for any key.
-     * @throws IllegalArgumentException if duration is negative or can't be 
represented as {@code long milliseconds}
+     * @throws NullPointerException       If {@code null} is used for any key.
+     * @throws IllegalArgumentException   if duration is negative or can't be 
represented as {@code long milliseconds}
      */
-    KeyValueIterator<Windowed<K>, V> fetch(K from, K to, Instant fromTime, 
Instant toTime)
+    KeyValueIterator<Windowed<K>, V> fetch(K from, K to, Instant timeFrom, 
Instant timeTo)
         throws IllegalArgumentException;
 
     /**
-    * Gets all the key-value pairs in the existing windows.
-    *
-    * @return an iterator over windowed key-value pairs {@code <Windowed<K>, 
value>}
-    * @throws InvalidStateStoreException if the store is not initialized
-    */
+     * Get all the key-value pairs in the given key range and time range from 
all the existing windows
+     * in backward order with respect to time (from end to beginning of time).
+     * <p>
+     * This iterator must be closed after use.
+     *
+     * @param from     the first key in the range
+     * @param to       the last key in the range
+     * @param timeFrom time range start (inclusive), where iteration ends.
+     * @param timeTo   time range end (inclusive), where iteration starts.
+     * @return an iterator over windowed key-value pairs {@code <Windowed<K>, 
value>}, from end to beginning of time.
+     * @throws InvalidStateStoreException if the store is not initialized
+     * @throws NullPointerException       If {@code null} is used for any key.
+     * @throws IllegalArgumentException   if duration is negative or can't be 
represented as {@code long milliseconds}
+     */
+    KeyValueIterator<Windowed<K>, V> backwardFetch(K from, K to, Instant 
timeFrom, Instant timeTo)

Review comment:
       Yeah, @jeqo noticed that back in the KeyValueStore PR. That's a good 
point about clarifying this point in the javadocs, not sure if it makes sense 
to do so on the ReadOnlyWindowStore methods directly vs on some IQ-related 
method/class? Maybe we can just do a quick followup PR to shore up the 
documentation here without blocking this PR




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to