You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Bill Bejeck (Jira)" <ji...@apache.org> on 2023/08/08 19:09:00 UTC
[jira] [Updated] (KAFKA-15126) Change range queries to accept null lower and upper bounds
[ https://issues.apache.org/jira/browse/KAFKA-15126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bill Bejeck updated KAFKA-15126:
--------------------------------
Fix Version/s: 3.6.0
> Change range queries to accept null lower and upper bounds
> ----------------------------------------------------------
>
> Key: KAFKA-15126
> URL: https://issues.apache.org/jira/browse/KAFKA-15126
> Project: Kafka
> Issue Type: Improvement
> Components: streams
> Reporter: Lucia Cerchie
> Assignee: Lucia Cerchie
> Priority: Minor
> Fix For: 3.6.0
>
> Original Estimate: 672h
> Remaining Estimate: 672h
>
> {color:#1d1c1d}When web client requests come in with query params, 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 (which will happen if they leave the params null). {color}
> {color:#1d1c1d}An example of the logic they can avoid using after this KIP is implemented is below:{color}
> {code:java}
> private RangeQuery<String, ValueAndTimestamp<StockTransactionAggregation>> createRangeQuery(String lower, String upper) {
> if (isBlank(lower) && isBlank(upper)) {
> return RangeQuery.withNoBounds();
> } else if (!isBlank(lower) && isBlank(upper)) {
> return RangeQuery.withLowerBound(lower);
> } else if (isBlank(lower) && !isBlank(upper)) {
> return RangeQuery.withUpperBound(upper);
> } else {
> return RangeQuery.withRange(lower, upper);
> }
> } {code}
>
> | |
--
This message was sent by Atlassian Jira
(v8.20.10#820010)