stac-utils / stac-utils/stac-fastapi

Use of NOT in advanced comparison operators throws error

Open
#473 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug spec
Dominant language
Python
Stars
324
Forks
126
Avg merge
1d 22h
Merged PRs (30d)
10

Description

The NOT operator can be used with all of the advanced comparison operators (https://github.com/opengeospatial/ogcapi-features/blob/master/cql2/standard/annex_ats_advanced-comparison-operators.adoc) like "NOT BETWEEN", "NOT LIKE", or "NOT IN"

Queries like eo:cloud_cover NOT BETWEEN 0 AND 50 and collection NOT LIKE 'sent%' throw an exception like Unexpected token Token('NOT', 'NOT') at line 1, column 16.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the NOT BETWEEN, NOT LIKE, and NOT IN queries from the issue and trace the parser exception. The work is done when these advanced comparison forms parse and execute without the reported unexpected-token error, with coverage for the examples provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.