Current state: ["Adopted"]
Discussion thread: https://lists.apache.org/thread/wnn2qrb7vglw11bdm2cdlkm1430b75zc
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
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.
An example of the logic they can avoid after this KIP is implemented is below:
We are not explicitly changing the public interface, but a KIP is appropriate because there's a behavior change. 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 RangeQuery java class from:
Compatibility, Deprecation, and Migration Plan
This will not affect users who are implementing a check of their nulls in their own code.
Users who send a web request with no parameters will still receive a full scan. This is mostly an improvement for new adopters of range queries.
New users will have the convenience of using the upper and lower bounds, and the docs will need to be updated to let users know they get the benefit of a full range scan when they insert null values.
Relevant unit tests will be added to demonstrate the functionality.