Skip to content

Fix '.;' in plan assumptions and warn on short top-N results - #39

Merged
Parth-Vasave merged 2 commits into
mainfrom
fix-plan-assumptions-and-top-n-check
Oct 26, 2026
Merged

Parth-Vasave merged 2 commits into
mainfrom
fix-plan-assumptions-and-top-n-check

Conversation

@Parth-Vasave

Copy link
Copy Markdown
Owner

Summary

The check stays silent for the validator's added or clamped MAX_ROWS limit, for queries without ORDER BY, for outer queries that aggregate, group or use DISTINCT, and for a top-N used only in an IN (...) filter.

Tests

  • backend/tests/test_result_checks.py: 11 new cases (Q052 shape, derived table, FETCH FIRST, and every non-firing case above)
  • frontend/src/components/Verification.test.tsx: two sentence-style assumptions render as separate items; filters still render joined

ruff, mypy, oxlint, tsc, the frontend build and the unit suites pass locally. The question suite was not re-run (it needs an LLM key).

Fixes #4
Fixes #16

Assumptions are usually whole sentences, so joining them with '; '
rendered '.;' between them. Filters stay joined: they are short
expressions.

Fixes #16
A ranking whose ORDER BY ... LIMIT N comes back short usually means a
filter or join dropped entities with no data (Q052: top 5 by
population, 4 rows). The check looks at the final SELECT, or at a CTE
or derived table it returns row for row, and ignores the enforced
MAX_ROWS cap. It is a warning, not a repair: fewer rows can be right.

Fixes #4
@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
frontiersql Ready Ready Preview Oct 26, 2026 5:59am UTC

@Parth-Vasave
Parth-Vasave merged commit c1f2961 into main Oct 26, 2026
12 checks passed
@Parth-Vasave
Parth-Vasave deleted the fix-plan-assumptions-and-top-n-check branch October 26, 2026 06:01

This branch was successfully deployed

1 active deployment
Preview — fe24bd6a Deployed Oct 26, 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.

Plan panel renders ".;" between sentence-style assumptions Result check: warn when a top-N query returns fewer than N rows

1 participant