feat(cql2-text): add array predicate support (A_EQUALS, A_CONTAINS, A_CONTAINEDBY, A_OVERLAPS)#152
Open
constantinius wants to merge 1 commit into
Open
feat(cql2-text): add array predicate support (A_EQUALS, A_CONTAINS, A_CONTAINEDBY, A_OVERLAPS)#152constantinius wants to merge 1 commit into
constantinius wants to merge 1 commit into
Conversation
constantinius
commented
Jun 9, 2026
Contributor
- Add 'a_containedBy' key to ARRAY_PREDICATES_MAP in cql2.py to match the camelCase used in CQL2-JSON (spec-compliant); the lowercase key is retained for the text parser
- Add array_predicate rule to the CQL2-text grammar: A_EQUALS, A_CONTAINS, A_CONTAINEDBY, A_OVERLAPS with two array_arg operands
- Inline empty_array and array as atom alternatives so LALR(1) can unambiguously parse '(1, 2, 3)' vs '(x)' by lookahead on the comma after the first element
- Add binary_array_predicate, array, and empty_array transformer methods to CQLTransformer; import ARRAY_PREDICATES_MAP from pygeofilter.cql2
- Add four tests: A_EQUALS/A_CONTAINS/A_OVERLAPS with a literal array and A_EQUALS with an empty array
…_CONTAINEDBY, A_OVERLAPS) - Add 'a_containedBy' key to ARRAY_PREDICATES_MAP in cql2.py to match the camelCase used in CQL2-JSON (spec-compliant); the lowercase key is retained for the text parser - Add array_predicate rule to the CQL2-text grammar: A_EQUALS, A_CONTAINS, A_CONTAINEDBY, A_OVERLAPS with two array_arg operands - Inline empty_array and array as atom alternatives so LALR(1) can unambiguously parse '(1, 2, 3)' vs '(x)' by lookahead on the comma after the first element - Add binary_array_predicate, array, and empty_array transformer methods to CQLTransformer; import ARRAY_PREDICATES_MAP from pygeofilter.cql2 - Add four tests: A_EQUALS/A_CONTAINS/A_OVERLAPS with a literal array and A_EQUALS with an empty array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.