Skip to content

fix(lapis): handle range filters with no bounds - #1971

Merged
fengelniederhammer merged 1 commit into
mainfrom
1968-range-filter-key-with-a-json-null-value-returns-http-400
Nov 18, 2026
Merged

fengelniederhammer merged 1 commit into
mainfrom
1968-range-filter-key-with-a-json-null-value-returns-http-400

Conversation

@fengelniederhammer

Copy link
Copy Markdown
Contributor

resolves #1968

A filter like ageFrom = null produces a range filter where both bounds are null, i.e. unboundend. Logically, this means that age is not null (i.e. a "proper value" without bounds).

Changing it to this logic:

  • when both bounds of a range filter are null, convert it to isNotNull
  • when one bound is set, convert it to >= / <=
  • when both bounds are set, convert it to between(...) (as before)

PR Checklist

  • All necessary documentation has been adapted.
  • All necessary changes are explained in the llms.txt.
  • The implemented feature is covered by an appropriate test.

@fengelniederhammer
fengelniederhammer requested review from fhennig and a balanced review from Copilot November 17, 2026 09:14
@vercel

vercel Bot commented Nov 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lapis Ready Ready Preview Nov 17, 2026 9:14am UTC

Request Review

@fengelniederhammer fengelniederhammer changed the title fix(lapis): handle range filters with no bounds fix(lapis): handle range filters with no bounds Nov 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 isNotNull when both bounds are null, inclusive comparisons for one-sided ranges, and between when 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

@fengelniederhammer
fengelniederhammer merged commit 849800f into main Nov 18, 2026
9 of 10 checks passed
@fengelniederhammer
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

1 active deployment
Preview — 3d82a9d6 Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Range filter key with a JSON null value returns HTTP 400

3 participants