Skip to content

Add explain endpoint for dev and fix not_exists query - #974

Draft
bryophyta wants to merge 5 commits into
mainfrom
pf/fix-ab-test-maybe
Draft

Add explain endpoint for dev and fix not_exists query#974
bryophyta wants to merge 5 commits into
mainfrom
pf/fix-ab-test-maybe

Conversation

@bryophyta

@bryophyta bryophyta commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

What does this change?

  • Fix regression introduced into the NOT EXISTS query variant, meaning that it should now be logically equivalent to the PLAIN NOT variant (as it should have been when the latter was first introduced).
  • Add a dev-only 'explain' endpoint.
  • Reinstate the A/B test.

How to test

Images

Introducing DB migrations?

Database migrations need to be applied manually before releasing. The docs can be found in db/README.md

  • Database migrations have been applied for CODE
  • Database migrations have been applied for PROD

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

According to the Postgres docs, `NOT NULL` evaluates to `NULL`, rather
than `TRUE`. But if we're saying "doesn't include x, y, z category codes", for instance, then we would want this to be `TRUE` for a row which had `category_codes: NULL`.

So we should use `(clause) IS NOT TRUE` instead of `NOT (clause)`.

https://www.postgresql.org/docs/17/functions-logical.html#FUNCTIONS-LOGICAL
@bryophyta bryophyta added fix Departmental tracking: fix feature Departmental tracking: work on a new feature and removed fix Departmental tracking: fix labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant