hanyuzheng7 commented on code in PR #14907:
URL: https://github.com/apache/kafka/pull/14907#discussion_r1416481880


##########
streams/src/main/java/org/apache/kafka/streams/query/TimestampedRangeQuery.java:
##########
@@ -82,25 +81,25 @@ public static <K, V> TimestampedRangeQuery<K, V> 
withUpperBound(final K upper) {
      * @param <V> The value type
      */
     public static <K, V> TimestampedRangeQuery<K, V> withLowerBound(final K 
lower) {
-        return new TimestampedRangeQuery<>(Optional.of(lower), 
Optional.empty(), true);
+        return new TimestampedRangeQuery<>(Optional.of(lower), 
Optional.empty(), ResultOrder.ANY);
     }
 
     /**
      * Determines if the serialized byte[] of the keys in ascending order.
      * Order is based on the serialized byte[] of the keys, not the 'logical' 
key order.
-     * @return true if ascending, false otherwise.
+     * @return return the order of return records base on the serialized 
byte[] of the keys(can be unordered, or in ascending, or in descending order).
      */
-    public boolean isKeyAscending() {
-        return isKeyAscending;
+    public ResultOrder resultOrder() {
+        return order;
     }
 
     /**
      * Set the query to return the serialized byte[] of the keys in descending 
order.
      * Order is based on the serialized byte[] of the keys, not the 'logical' 
key order.
-     * @return a new RangeQuery instance with descending flag set.
+     * @return a new RangeQuery instance with DESCENDING set.
      */
     public TimestampedRangeQuery<K, V> withDescendingKeys() {

Review Comment:
   ok



##########
streams/src/main/java/org/apache/kafka/streams/query/TimestampedRangeQuery.java:
##########
@@ -82,25 +81,25 @@ public static <K, V> TimestampedRangeQuery<K, V> 
withUpperBound(final K upper) {
      * @param <V> The value type
      */
     public static <K, V> TimestampedRangeQuery<K, V> withLowerBound(final K 
lower) {
-        return new TimestampedRangeQuery<>(Optional.of(lower), 
Optional.empty(), true);
+        return new TimestampedRangeQuery<>(Optional.of(lower), 
Optional.empty(), ResultOrder.ANY);
     }
 
     /**
      * Determines if the serialized byte[] of the keys in ascending order.
      * Order is based on the serialized byte[] of the keys, not the 'logical' 
key order.
-     * @return true if ascending, false otherwise.
+     * @return return the order of return records base on the serialized 
byte[] of the keys(can be unordered, or in ascending, or in descending order).
      */
-    public boolean isKeyAscending() {
-        return isKeyAscending;
+    public ResultOrder resultOrder() {
+        return order;
     }
 
     /**
      * Set the query to return the serialized byte[] of the keys in descending 
order.
      * Order is based on the serialized byte[] of the keys, not the 'logical' 
key order.
-     * @return a new RangeQuery instance with descending flag set.
+     * @return a new RangeQuery instance with DESCENDING set.

Review Comment:
   ok



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to