Skip to content

Harden query repair edge cases#16

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

Harden query repair edge cases#16
duriantaco merged 1 commit into
mainfrom
fix/query-repair-aliases

Conversation

@duriantaco

Copy link
Copy Markdown
Owner

Summary

  • Fix query repair false positives from dotted string literals like 'Foo.Bar'
  • Validate against fields found across sparse arrays, not only the first object
  • Prefer nested leaf matches and selected aliases when repairing typos
  • Quote special-character keys in Smart Inspect suggestions and repair Try commands
  • Validate fields inside from-query row contexts and selected expressions

Deep sweep repros fixed

  • python -m jonq tests/json_test_files/all.json "select name where text contains 'Foo.Bar'"
  • python -m jonq tests/json_test_files/missing_fields.json "select id, name, age" -t
  • python -m jonq tests/json_test_files/nested.json "select name where cty = 'New York'"
  • python -m jonq tests/json_test_files/special_characters_keys.json
  • python -m jonq tests/json_test_files/special_characters_keys.json "select first_nme"
  • python -m jonq tests/json_test_files/nested.json "select order_id, pric from [].orders" -t
  • python -m jonq tests/json_test_files/simple.json "select coalesce(nme, name) as display"
  • python -m jonq tests/json_test_files/simple.json "select city, count(*) as count group by city having cnt > 1"

Verification

  • pytest -q tests/test_new_features.py tests/test_main_edge_cases.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-deep-sweep-final
  • python -m pre_commit run --all-files
  • python -m pre_commit run --hook-stage pre-push --all-files

@duriantaco duriantaco merged commit 398fd1b into main Apr 30, 2026
3 checks passed
@duriantaco duriantaco deleted the fix/query-repair-aliases branch April 30, 2026 01:05
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