You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Cerchie (via GitHub)" <gi...@apache.org> on 2023/07/10 18:48:45 UTC
[GitHub] [kafka] Cerchie opened a new pull request, #13987: Kafka-15126: Range queries to accept null lower and upper bounds
Cerchie opened a new pull request, #13987:
URL: https://github.com/apache/kafka/pull/13987
Change in response to [KIP-941](https://cwiki.apache.org/confluence/display/KAFKA/KIP-941%3A+Range+queries+to+accept+null+lower+and+upper+bounds).
Changes line 57 in the RangeQuery class file from:
```
public static <K, V> RangeQuery<K, V> withRange(final K lower, final K upper) {
return new RangeQuery<>(Optional.of(lower), Optional.of(upper));
}
```
to
```
public static <K, V> RangeQuery<K, V> withRange(final K lower, final K upper) {
return new RangeQuery<>(Optional.ofNullable(lower), Optional.ofNullable(upper));
}
```
Testing strategy:
Since null values can now be entered in `RangeQuery`s in order to receive full scans, I changed the logic defining `query` starting at [line 1085](https://github.com/apache/kafka/blob/trunk/streams/src/test/java/org/apache/kafka/streams/integration/IQv2StoreIntegrationTest.java#L1085) in `IQv2StoreIntegrationTest.java` from:
```
final RangeQuery<Integer, V> query;
if (lower.isPresent() && upper.isPresent()) {
query = RangeQuery.withRange(lower.get(), upper.get());
} else if (lower.isPresent()) {
query = RangeQuery.withLowerBound(lower.get());
} else if (upper.isPresent()) {
query = RangeQuery.withUpperBound(upper.get());
} else {
query = RangeQuery.withNoBounds();
}
```
to
```
query = RangeQuery.withRange(lower.orElse(null), upper.orElse(null));
```
because different combinations of `isPresent()` in the bounds is no longer necessary.
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] Cerchie closed pull request #13987: Kafka-15126: Range queries to accept null lower and upper bounds
Posted by "Cerchie (via GitHub)" <gi...@apache.org>.
Cerchie closed pull request #13987: Kafka-15126: Range queries to accept null lower and upper bounds
URL: https://github.com/apache/kafka/pull/13987
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] Cerchie commented on pull request #13987: Kafka-15126: Range queries to accept null lower and upper bounds
Posted by "Cerchie (via GitHub)" <gi...@apache.org>.
Cerchie commented on PR #13987:
URL: https://github.com/apache/kafka/pull/13987#issuecomment-1660655540
closing due to merge issue, refer to https://github.com/apache/kafka/pull/14137
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] bbejeck commented on pull request #13987: Kafka-15126: Range queries to accept null lower and upper bounds
Posted by "bbejeck (via GitHub)" <gi...@apache.org>.
bbejeck commented on PR #13987:
URL: https://github.com/apache/kafka/pull/13987#issuecomment-1650430142
@Cerchie since it's been a couple of weeks for this PR can you rebase this with trunk?
Pending the related tests passing we should be able to merge
ping @vvcephei for a quick second look
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org