Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Current state["Under Discussion"]

Discussion thread:  
JIRA https://lists.apache.org/thread/wnn2qrb7vglw11bdm2cdlkm1430b75zc

JIRA:

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-15126

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

Within the RangeQuery class in the Interactive Query API (which allows you to leverage the state of your application from outside your application), there are methods for getting the upper and lower bounds. When web client requests come in with query params (which become those bounds), it's common for those params to be null. We want developers to just be able to pass in the upper/lower bounds if they want instead of implementing their own logic to avoid getting the whole range. 

...

We are not explicitly changing the public interface, but a KIP is appropriate because there's a behavior change. If As it stands on 6/26/23, if you pass in a null value to the RangeQuery without a specified upper and lower bound, it will perform a full range scan. After this proposed change, you will need to specify an upper and lower bound of null in order to perform a full range scan. This change in behavior will need to be documented. 

...

The proposed change takes line 57 of the RangQuery RangeQuery java class from: 

Code Block
    public static <K, V> RangeQuery<K, V> withRange(final K lower, final K upper) {
        return new RangeQuery<>(Optional.of(lower), Optional.of(upper));
    }

...