[ 
https://issues.apache.org/jira/browse/KAFKA-15126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bill Bejeck resolved KAFKA-15126.
---------------------------------
    Resolution: Fixed

[Merged to trunk|https://github.com/apache/kafka/pull/14137]

> 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)

Reply via email to