Skip to content

feat: add ORDER BY support and improve unsupported feature errors#12

Merged
sonesuke merged 1 commit intomainfrom
feat/order-by-and-unsupported-errors
Apr 5, 2026
Merged

feat: add ORDER BY support and improve unsupported feature errors#12
sonesuke merged 1 commit intomainfrom
feat/order-by-and-unsupported-errors

Conversation

@sonesuke
Copy link
Copy Markdown
Owner

@sonesuke sonesuke commented Apr 5, 2026

Summary

  • Add ORDER BY clause with ASC/DESC sorting (single and multiple columns)
  • Extract result processing (DISTINCT, ORDER BY) into result_processor module for clearer separation of concerns
  • Add word boundary checks to grammar keywords to prevent prefix conflicts (e.g. OR matching inside ORDER)
  • Add EOI to grammar to ensure full input is consumed, preventing silent ignore of unsupported clauses like SKIP/LIMIT
  • Detect unsupported Cypher keywords and return clear error messages (e.g. "Unsupported feature: SKIP. Supported clauses: MATCH, WHERE, RETURN, ORDER BY.")

Test plan

  • cargo test — 83 tests pass (14 new)
  • cargo clippy --all-targets — no warnings
  • Parser tests for ORDER BY (ASC, DESC, multiple columns, variable-only)
  • Executor tests for sorting (numbers, strings, multi-column, with DISTINCT)
  • Unsupported feature error tests (SKIP, LIMIT, CREATE)

🤖 Generated with Claude Code

- Add ORDER BY clause with ASC/DESC sorting (single and multiple columns)
- Extract result processing (DISTINCT, ORDER BY) into result_processor module
- Add word boundary checks to keywords to prevent prefix conflicts (e.g. OR vs ORDER)
- Add EOI to grammar to ensure full input consumption
- Detect unsupported Cypher keywords and return clear error messages
- Add 14 new tests (parser, executor, result_processor)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonesuke sonesuke force-pushed the feat/order-by-and-unsupported-errors branch from e32ca9a to 4cae09f Compare April 5, 2026 14:14
@sonesuke sonesuke merged commit e996bcc into main Apr 5, 2026
4 checks passed
@sonesuke sonesuke deleted the feat/order-by-and-unsupported-errors branch April 5, 2026 14:17
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