Skip to content

feat(cql2-text): add array predicate support (A_EQUALS, A_CONTAINS, A_CONTAINEDBY, A_OVERLAPS)#152

Open
constantinius wants to merge 1 commit into
mainfrom
cql2-array-compliance
Open

feat(cql2-text): add array predicate support (A_EQUALS, A_CONTAINS, A_CONTAINEDBY, A_OVERLAPS)#152
constantinius wants to merge 1 commit into
mainfrom
cql2-array-compliance

Conversation

@constantinius

Copy link
Copy Markdown
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
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