Repository navigation
fix(lapis): handle range filters with no bounds - #1971
Merged
fengelniederhammer merged 1 commit intoNov 18, 2026
Merged
fengelniederhammer merged 1 commit into
fengelniederhammer merged 1 commit into
Conversation
fengelniederhammer
requested review from
fhennig
and
a balanced review from Copilot
November 17, 2026 09:14
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The review identifies no active issues with the null-bound range filter changes.
No open issues 🎉
What changed in this PR
Fixes #1968 by translating unbounded range filters into non-null checks, avoiding RhyDB’s rejection of between(null, null) queries.
Changes:
- Uses
isNotNullwhen both bounds are null, inclusive comparisons for one-sided ranges, andbetweenwhen both bounds are set. - Shares range translation across date, integer, and float filters.
- Updates unit tests and adds end-to-end cases for null bounds.
| File | Description |
|---|---|
lapis/src/test/kotlin/org/genspectrum/lapis/rhydb/RhyDbQueryToSaneQlTest.kt |
Covers updated range rendering and null bounds. |
lapis/src/main/kotlin/org/genspectrum/lapis/rhydb/SaneQlAst.kt |
Adds inclusive comparison expressions. |
lapis/src/main/kotlin/org/genspectrum/lapis/rhydb/RhyDbQueryDsl.kt |
Adds shared range translation and a non-null helper. |
lapis/src/main/kotlin/org/genspectrum/lapis/rhydb/RhyDbQuery.kt |
Routes date and numeric ranges through the shared helper. |
lapis-e2e/test/aggregatedQueries/intRangeWithNullBounds.json |
Tests an integer range with both bounds null. |
lapis-e2e/test/aggregatedQueries/floatToNull.json |
Tests a null float upper bound. |
lapis-e2e/test/aggregatedQueries/dateFromNull.json |
Tests a null date lower bound. |
Review effort: Balanced
fhennig
approved these changes
Nov 18, 2026
fengelniederhammer
deleted the
1968-range-filter-key-with-a-json-null-value-returns-http-400
branch
November 18, 2026 09:45
fengelniederhammer
pushed a commit
that referenced
this pull request
Nov 18, 2026
🤖 I have created a release *beep* *boop* --- ## [0.9.3](v0.9.2...v0.9.3) (2026-11-18) ### Bug Fixes * **lapis:** `server.tomcat.max-parameter-count=10000` to allow large POST form requests ([#1969](#1969)) ([fd58465](fd58465)), closes [#1966](#1966) * **lapis:** handle range filters with no bounds ([#1971](#1971)) ([849800f](849800f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #1968
A filter like
ageFrom = nullproduces a range filter where both bounds arenull, i.e. unboundend. Logically, this means thatageis not null (i.e. a "proper value" without bounds).Changing it to this logic:
null, convert it toisNotNull>=/<=between(...)(as before)PR Checklist
llms.txt.