Skip to content

Add query repair suggestions#14

Merged
duriantaco merged 1 commit into
mainfrom
feature/query-repair
Apr 30, 2026
Merged

Add query repair suggestions#14
duriantaco merged 1 commit into
mainfrom
feature/query-repair

Conversation

@duriantaco

Copy link
Copy Markdown
Owner

Summary

  • Expand schema validation from selected fields only to selected fields, filters, sorting, grouping, and aggregations
  • Add nested field discovery for repair suggestions
  • Print nearby field matches and a copy-paste Try command when jonq can repair a typo
  • Keep the behavior flagless and focused on helping users recover from wrong JSON paths

Manual checks

  • python -m jonq tests/json_test_files/simple.json "select nme"
  • python -m jonq tests/json_test_files/simple.json "select name where cty = 'Chicago'"
  • python -m jonq tests/json_test_files/simple.json "select name sort ag desc"
  • python -m jonq tests/json_test_files/simple.json "select avg(ag) as avg_age"
  • python -m jonq tests/json_test_files/simple.json "select name where city = 'Chicago'"
  • python -m jonq tests/json_test_files/simple.json "select name sort age desc"
  • python -m jonq tests/json_test_files/simple.json "select avg(age) as avg_age"

Verification

  • pytest -q tests/test_new_features.py
  • pytest -q
  • uvx ruff check --force-exclude jonq tests
  • python -m compileall -q jonq
  • LC_ALL=C LANG=C python -m sphinx -b html docs/source /tmp/jonq-docs-query-repair
  • python -m pre_commit run --all-files
  • python -m pre_commit run --hook-stage pre-push --all-files

@duriantaco duriantaco merged commit 0c0e6d5 into main Apr 30, 2026
3 checks passed
@duriantaco duriantaco deleted the feature/query-repair branch April 30, 2026 00:43
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.

1 participant