Skip to content

Improved Parenthesis Handling and Spanner Limit Mitigation#1272

Merged
jcscottiii merged 2 commits intomainfrom
jcscottiii/grammar-fix
Mar 17, 2025
Merged

Improved Parenthesis Handling and Spanner Limit Mitigation#1272
jcscottiii merged 2 commits intomainfrom
jcscottiii/grammar-fix

Conversation

@jcscottiii
Copy link
Collaborator

This PR improves search query generation by:

  • Grammar: Adding parenthesizedCriteria to explicitly capture parenthesized expressions.
  • Visitor: Updating the visitor to create SearchNode objects with parenthesis information.
  • Filter Generation: Refactoring traverseAndGenerateFilters to correctly handle parentheses and minimize unnecessary nesting in Spanner queries, mitigating Spanner's complexity limits.

Without this change, a user cannot query more than 50 ids at a given time.

This PR improves search query generation by:

- Grammar: Adding parenthesizedCriteria to explicitly capture parenthesized expressions.
- Visitor: Updating the visitor to create SearchNode objects with parenthesis information.
- Filter Generation: Refactoring traverseAndGenerateFilters to correctly handle parentheses and minimize unnecessary nesting in Spanner queries, mitigating Spanner's complexity limits.

Without this change, a user cannot query more than 50 ids at a given time.
@jcscottiii jcscottiii requested review from KyleJu and jrobbins March 13, 2025 22:37
Copy link
Contributor

@KyleJu KyleJu left a comment

Choose a reason for hiding this comment

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

LGTM with a question

@jcscottiii jcscottiii enabled auto-merge March 17, 2025 14:55
@jcscottiii jcscottiii added this pull request to the merge queue Mar 17, 2025
Merged via the queue into main with commit dd082e1 Mar 17, 2025
6 checks passed
@jcscottiii jcscottiii deleted the jcscottiii/grammar-fix branch March 17, 2025 15:31
@jcscottiii jcscottiii mentioned this pull request Mar 20, 2025
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.

2 participants