hanyuzheng7 commented on code in PR #14907:
URL: https://github.com/apache/kafka/pull/14907#discussion_r1416481443
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredKeyValueStore.java:
##########
@@ -254,12 +255,12 @@ private <R> QueryResult<R> runRangeQuery(final Query<R>
query,
final QueryResult<R> result;
final RangeQuery<K, V> typedQuery = (RangeQuery<K, V>) query;
RangeQuery<Bytes, byte[]> rawRangeQuery;
- final boolean isKeyAscending = typedQuery.isKeyAscending();
+ final ResultOrder order = typedQuery.resultOrder();
rawRangeQuery = RangeQuery.withRange(
keyBytes(typedQuery.getLowerBound().orElse(null)),
keyBytes(typedQuery.getUpperBound().orElse(null))
);
- if (!isKeyAscending) {
+ if (order.equals(ResultOrder.DESCENDING)) {
Review Comment:
Given that 'ANY' and 'ASCENDING' are treated the same, except for
'ResultOrder.DESCENDING', should a separate statement be used to handle the
'ASCENDING' case?
--
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]