Skip to content

Conversation

@adamdickmeiss
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements case-insensitive relation checking in the CQL parser to fix issue #17. The parser now accepts relation keywords (such as "any", "all", "within", etc.) in any case combination while preserving the original casing in the parsed output.

Key changes:

  • Modified the isRelation() method to use equalsIgnoreCase() for all relation keyword checks
  • Updated custom relation matching to use case-insensitive comparison via stream API
  • Updated test fixtures to verify case-insensitive parsing behavior with capitalized relation keywords

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main/java/org/z3950/zing/cql/CQLParser.java Refactored isRelation() and isSymbolicRelation() methods to use case-insensitive comparisons and improved code formatting
src/test/resources/regression/09/06.cql Updated test input to use "Sortby" instead of "sortby" to verify case-insensitive parsing
src/test/resources/regression/09/06.xcql Updated expected output to reflect "Sortby" with capital S
src/test/resources/regression/02/03.cql Updated test input to use "Any" instead of "any" to verify case-insensitive relation parsing
src/test/resources/regression/02/03.xcql Updated expected output to reflect "Any" with capital A

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adamdickmeiss adamdickmeiss merged commit a4fe77b into master Dec 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants